YAMAGUCHI::weblog

海水パンツとゴーグルで、巨万の富を築きました。カリブの怪物、フリーアルバイター瞳です。

2006-07-07から1日間の記事一覧

ふつうのHaskellプログラミング 第8章 練習問題

lrstrip.hs lrstrip :: String -> String lrstrip = rstrip . lstrip tail2.hs main = do cs <- getContents putStr $ lastNLines 10 cs lastNLines :: Int -> String -> String lastNLines n = unlines . reverse . take n . reverse . lines fgrep.hs fgre…