shithub: MicroHs

ref: b2de98441112c9eac3de6d7d43537fed2dc66855
dir: /Example.hs/

View raw version
module Example(fac, main) where
import Prelude

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

main :: IO ()
main = do
  --putStrLn $ "word size=" ++ show _wordSize ++ ", os=" ++ if _isWindows then "Windows" else "Unix-like"
  let
    rs = map fac [1,2,3,10]
  putStrLn "Some factorials"
  print rs