Unit tests for Literate Haskell
[ohcount] / test / expected_dir / lithask1.lhs / haskell / code
1 > main :: IO ()
2 > main = do putStr "Enter a number: "
3 >           l <- readLine
4 >           putStr "n!= "
5 >           print (fact (read l))
6 > fact :: Integer -> Integer
7 > fact 0 = 1
8 > fact n = n * fact (n-1)