shithub: MicroHs

ref: 0b49c736b78cd1a075a09c7a5b6b11d60298ee3c
dir: /Example.hs/

View raw version
module Example(module Example) where
import Prelude

fac :: Int -> Int
fac 0 = 1
fac n = n * fac(n-1)

main :: IO ()
main = do
  let
    rs = map fac [1,2,3,10]
  putStrLn "Some factorials"
  putStrLn $ showList showInt rs