{"width":"100%","blog_url":"https://sirocco.hatenadiary.org/","published":"2010-04-28 06:10:43","blog_title":"sirocco \u306e\u66f8\u3044\u3066\u3082\u3059\u3050\u306b\u5fd8\u308c\u308b\u30e1\u30e2","image_url":null,"provider_name":"Hatena Blog","type":"rich","version":"1.0","url":"https://sirocco.hatenadiary.org/entry/20100428/1272402643","author_name":"sirocco","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsirocco.hatenadiary.org%2Fentry%2F20100428%2F1272402643\" title=\"\u7121\u9650\u30ea\u30b9\u30c8\u3092\u4f5c\u6210\u51fa\u6765\u306a\u3044\u4f8b(foldl) - sirocco \u306e\u66f8\u3044\u3066\u3082\u3059\u3050\u306b\u5fd8\u308c\u308b\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"http://en.wikibooks.org/wiki/Haskell/List_processing replicate \u306f\u7b2c 2 \u5f15\u6570\u306e\u5024\u3092\u8981\u7d20\u3068\u3059\u308b\u9577\u3055\u7b2c 1 \u5f15\u6570\u306e\u30ea\u30b9\u30c8\u3092\u4f5c\u308b\u95a2\u6570 ghci> replicate 3 \"abc\" [\"abc\",\"abc\",\"abc\"] echoesR \u306f foldr \u3092\u4f7f\u7528\u3057\u305f\u8981\u7d20\u306e\u6570\u3092\u9023\u7d9a\u3055\u305b\u308b\u95a2\u6570 ghci> echoesR = foldr (\\x xs -> (replicate x x) ++ xs) [] ghci> echoesR [7,2,4,5] [7,7,7,7,7,7,7,2,2,4,4,4,4,5,5,5,5,5] ghci> \u2026","provider_url":"https://hatena.blog","height":"190","author_url":"https://blog.hatena.ne.jp/sirocco/","title":"\u7121\u9650\u30ea\u30b9\u30c8\u3092\u4f5c\u6210\u51fa\u6765\u306a\u3044\u4f8b(foldl)","categories":["Haskell"]}