mirror of
https://github.com/sdiehl/write-you-a-haskell.git
synced 2024-09-11 11:46:57 +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.