shithub: MicroHs

ref: 814c79f13a5e5b83ea203f4f8b1e4ceda6236e61
dir: /Example.hs/

View raw version
module Example(main) 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