第一章

このブログは移転しました
3秒後にリダイレクトされますblog.ltakeshi.info

大体既知の事柄。
練習問題1,2は省略。
練習問題3

main = interact wordCount
    where wordCount input = show (length (words input)) ++ "\n"

練習問題4

main = interact wordCount
    where wordCount input = show (length input) ++ "\n"

とりあえずこんな感じかと。