Files
grokking_algorithms/03_recursion/Haskell/01_countdown.hs
Bijoy Thomas 6f78bdf3d7 Adding Haskell examples (#17)
* Adding binary search example for Haskell

* Adding selection sort example in Haskell

* Adding Haskell examples for chapter 3

* Adding examples for chapter 4

* Adding examples for chapter 5

* Adding git ignore

* Add Haskell example for BFS
2017-06-11 19:12:48 -04:00

9 lines
152 B
Haskell

countdown :: Integer -> IO()
countdown n
| n < 0 = return ()
| otherwise = do
putStrLn (show n)
countdown (n-1)
main = do
countdown 5