2006-06-30から1日間の記事一覧
expandA関数の定義の部分で"expandA"を"expadnA"とミスタイプしちゃったのにコンパイル通っちゃった。どうしてだろう?とりあえず自分の解答。 expandA.hs main = do cs <- getContents putStr $ expand cs expand :: String -> String expand cs = map expa…
自分が作ってみた解答。こんな感じでいいんでしょうか? countbyte.hs main = do cs <- getContents print $ length cs countword main = do cs <- getContents print $ length $ words cs