write-you-a-haskell/chapter3/calc
2015-01-20 10:48:22 -05:00
..
calc.cabal Added transformers to cabal file. 2015-01-18 03:57:47 +01:00
Eval.hs initial commit 2015-01-05 02:54:15 -05:00
Main.hs initial commit 2015-01-05 02:54:15 -05:00
Parser.hs infixOp to prefixOp 2015-01-20 10:48:22 -05:00
Pretty.hs There is no Type module to import. 2015-01-18 03:40:22 +01:00
README.md initial commit 2015-01-05 02:54:15 -05:00
Syntax.hs initial commit 2015-01-05 02:54:15 -05:00

Arith

A untyped arithmetic.

To compile and run:

$ cabal run

Usage:

Arith> succ 0
succ 0

Arith> succ (succ 0)
succ (succ 0)

Arith> if false then true else false
false

Arith> iszero (pred (succ (succ 0)))
false

Arith> pred (succ 0)
0

Arith> iszero false
Cannot evaluate

Arith> if 0 then true else false
Cannot evaluate

License

Released under MIT license.