Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 493 Bytes

README.md

File metadata and controls

31 lines (25 loc) · 493 Bytes

Natural Numbers Toy

From zero to infinity and beyond.

Read the code:

main :: IO ()
main = do
  print zero
  print one
  print two
  print three
  print four
  print five

Build and run the app:

stack build
stack exec nat-haskell
Zero
Succ Zero
Succ (Succ Zero)
Succ (Succ (Succ Zero))
Succ (Succ (Succ (Succ Zero)))
Succ (Succ (Succ (Succ (Succ Zero))))

Compare with the typescript version