String
是「list ofchar
」的別名(type alias、type synonym)。- 使用
print
或putStrLn
輸出到終端機。不過,print
會帶 quotation marks。
-- print.hs
module Print1 where
main :: IO()
main = putStrLn "hello world!"
String
是「list of char
」的別名(type alias、type synonym)。print
或 putStrLn
輸出到終端機。不過,print
會帶 quotation marks。-- print.hs
module Print1 where
main :: IO()
main = putStrLn "hello world!"