{"provider_url":"https://hatena.blog","title":"unfoldr \u3092\u4f7f\u3063\u30662\u9032\u6570\u6587\u5b57\u5217\u3092\u4f5c\u308b","categories":["Haskell"],"blog_url":"https://sirocco.hatenadiary.org/","height":"190","url":"https://sirocco.hatenadiary.org/entry/20130416/1366121105","image_url":null,"blog_title":"sirocco \u306e\u66f8\u3044\u3066\u3082\u3059\u3050\u306b\u5fd8\u308c\u308b\u30e1\u30e2","description":"Data.List \u306b unfoldr \u3068\u3044\u3046\u95a2\u6570\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3069\u3046\u3044\u3046\u4f7f\u3044\u9053\u306a\u306e\u3060\u308d\u3046\u3068\u601d\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u6570\u30922\u9032\u6570\u6587\u5b57\u5217\u306b\u5909\u63db\u3067\u304d\u308b\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u3084\u3063\u3066\u307f\u307e\u3057\u305f\u3002 Data.List\u306e\u4f8b --A simple use of unfoldr: unfoldr (\\b -> if b == 0 then Nothing else Just (b, b-1)) 10 -- > [10,9,8,7,6,5,4,3,2,1] 2\u9032\u6570\u6587\u5b57\u5217\u3092\u4f5c\u3063\u3066\u307f\u307e\u3059\u3002 > :t unfoldr unfoldr :: (b -> Maybe (a, b)) -> b -> [a] - \u30eb\u30fc\u30d7\u304c\u7d42\u4e86\u3059\u308b\u3068\u304d\u306f\u2026","author_url":"https://blog.hatena.ne.jp/sirocco/","author_name":"sirocco","published":"2013-04-16 23:05:05","provider_name":"Hatena Blog","version":"1.0","type":"rich","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsirocco.hatenadiary.org%2Fentry%2F20130416%2F1366121105\" title=\"unfoldr \u3092\u4f7f\u3063\u30662\u9032\u6570\u6587\u5b57\u5217\u3092\u4f5c\u308b - 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>"}