mirror of
https://github.com/sdiehl/write-you-a-haskell.git
synced 2024-10-26 19:28:33 +03:00
.. | ||
calc.cabal | ||
Eval.hs | ||
Main.hs | ||
Parser.hs | ||
Pretty.hs | ||
README.md | ||
Syntax.hs |
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.