Haskell 学习

truncate pi

-- 表示截断, 此处结果为 3


haskell中的touple是可变的,而python中是不可变的


lines函数:

lines :: String -> [String]

以‘\n'为分隔符,建立列表


interact 函数:

interact :: (String -> String) -> IO ()

 

posted on 2014-03-07 12:47  Stomach_ache  阅读(145)  评论(0)    收藏  举报

导航