{"description":"\u3075\u3064\u3051\u308b\u306e p.44 head \u30b3\u30de\u30f3\u30c9\u304b\u3089\u3002 main = do cs <- getContents putStr $ firstNLines 10 cs firstNLines n cs = unlines $ take n $ lines cslines \u95a2\u6570\u3067\u6587\u5b57\u5217\u3092\u6539\u884c\u3067\u533a\u5207\u3063\u3066\u30ea\u30b9\u30c8\u3092\u4f5c\u3063\u3066\u3001take \u95a2\u6570\u3067\u6700\u521d\u306e10\u8981\u7d20\u3092\u53d6\u308b\u3002\u305d\u3057\u3066\u3001unlines \u95a2\u6570\u3067\u305d\u308c\u3092\u6539\u884c\u6587\u5b57\u3067\u9023\u7d50\u3059\u308b\u3001\u3068\u3002 lines \u306f SML \u3067\u306f\u6b21\u306e\u3088\u3046\u306b\u66f8\u3051\u308b\u3002 fun lines s = String.fields (fn c => c = #\"\\n\") sString.fields \u306b\u4f3c\u305f\u95a2\u6570\u3068\u3057\u3066 S\u2026","version":"1.0","height":"190","type":"rich","title":"\u3075\u3064\u3051\u308b 2,3 \u7ae0","image_url":null,"provider_name":"Hatena Blog","provider_url":"https://hatena.blog","author_name":"suiginto","author_url":"https://blog.hatena.ne.jp/suiginto/","categories":["Haskell"],"width":"100%","published":"2006-12-10 09:51:38","url":"https://suiginto.hatenadiary.org/entry/20061210/1165798298","blog_title":"Today I abandon","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsuiginto.hatenadiary.org%2Fentry%2F20061210%2F1165798298\" title=\"\u3075\u3064\u3051\u308b 2,3 \u7ae0 - Today I abandon\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://suiginto.hatenadiary.org/"}