学习haskell
先来个哈喽喔儿的: main = putStrLn "Hello, World!" main代表函数名,等号「=」代表函数的实现。函数的参数放在函数名main和等号「=」之间。 GHCi, version 7.4.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> :load foo.hs [1 of 1] Compiling Main ( foo.hs, interpreted ) Ok, modules loaded: Main. *Main> main Hello, World! 编辑好foo.hs,在ghci用:load命令加载,简单,挺好。...