{"height":"190","author_name":"blanketsky","provider_url":"https://hatena.blog","published":"2008-06-18 11:15:38","width":"100%","blog_title":"blanket log","categories":["Haskell"],"author_url":"https://blog.hatena.ne.jp/blanketsky/","title":" \u7121\u9650\u30ea\u30b9\u30c8\u3092\u9014\u4e2d\u3067\u6253\u3061\u5207\u308a\u305f\u3044","version":"1.0","image_url":null,"description":"\u305f\u3068\u3048\u3070\u3042\u308b\u95a2\u6570 f \u304c\u5358\u8abf\u5897\u52a0\u3059\u308b\u3053\u3068\u304c\u5206\u304b\u3063\u3066\u3044\u308b\u5834\u5408\u3001 sum [ a | x <- [1..], let a = f x, a < m ] \u307f\u305f\u3044\u306b\u66f8\u3044\u3066\u3001m \u672a\u6e80\u306e f(x) \u306e\u548c\u3092\u8a08\u7b97\u3057\u305f\u3044\u306e\u3067\u3059\u3002\u3082\u3061\u308d\u3093\u3053\u306e\u30b3\u30fc\u30c9\u306f\u6b62\u307e\u308a\u307e\u305b\u3093\u3002\u51e6\u7406\u7cfb\u306f\u95a2\u6570\u304c\u5358\u8abf\u5897\u52a0\u3060\u306a\u3093\u3066\u77e5\u308b\u7531\u3082\u306a\u3044\u306e\u3067\u3059\u304b\u3089\u3002\u3053\u306e\u4f8b\u306e\u3088\u3046\u306a\u5834\u5408\u306f takeWhile \u3084 dropWhile \u3092\u4f7f\u3063\u3066 sum $ takeWhile (< m) [ a | x <- [1..], let a = f x ] \u3068\u66f8\u3051\u307e\u3059\u3002m \u3068\u306e\u6bd4\u8f03\u3092\u30ea\u30b9\u30c8\u5185\u5305\u306e\u5916\u306b\u79fb\u3057\u305f\u3060\u3051\u3067\u3059\u3002\u5927\u62b5\u306e\u5834\u5408\u306f\u3053\u308c\u3067\u6e08\u3080\u306e\u3067\u3059\u304c\u3001\u6253\u3061\u5207\u308b\u304b\u3069\u3046\u304b\u306e\u5224\u65ad\u3092\u30ea\u30b9\u2026","url":"https://blanketsky.hatenadiary.org/entry/20080618/1213755338","type":"rich","blog_url":"https://blanketsky.hatenadiary.org/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblanketsky.hatenadiary.org%2Fentry%2F20080618%2F1213755338\" title=\" \u7121\u9650\u30ea\u30b9\u30c8\u3092\u9014\u4e2d\u3067\u6253\u3061\u5207\u308a\u305f\u3044 - blanket log\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog"}