2008-02-18から1日間の記事一覧

条件を満たす行を取り除く

今回は条件を満たす行を取り除くに挑戦。最初に書いたのはこれでした。 main = do cs <- getContents putStr $ unlines $ filter match $ lines cs where match :: String -> Bool match [] = True match s = if head s == '#' then False else True 投稿さ…