{"type":"rich","description":"\u6700\u8fd1\u3001\u3053\u308c\u3070\u3063\u304b\u3002 \u30ea\u30b9\u30c8\u3092\u4e0e\u3048\u3089\u308c\u3066\u3001\u305d\u3053\u304b\u3089Finger tree\u3092\u4f5c\u308b\u3068\u3044\u3046\u95a2\u6570 listToTree \u3092\u4f5c\u308b\u3068\u3057\u3066\u3001\u3069\u3046\u3084\u3063\u3066\u4f5c\u308b\u304b\u3002 \u5358\u7d14\u306b\u306f\u3001pushL\u3092\u9023\u7d9a\u7684\u306b\u9069\u7528\u3057\u3066\u3001 listToTree ls = foldr pushL Empty ls\u3068\u3084\u3063\u3066\u3001pushL\u304cO(1)\u306a\u306e\u3067\u3053\u308c\u3067\u3082\u3088\u3044\u306e\u3060\uff08\u3057\u3001\u8ad6\u6587\u306f\u3053\u308c\u3067\u66f8\u3044\u3066\u3044\u308b\uff09\u3051\u308c\u3069\u3001\u3082\u3063\u3068\u52b9\u7387\u3088\u304f\u3067\u304d\u308b\u306f\u305a\u3060\u3088\u306d\u3001\u3068\u3044\u3046\u3002 \u4f8b\u3048\u3070\u3001 listToTree ls # len = length ls pr = take 4 ls sf = drop (len - 4) ls md = take (len - 8) (drop 4 ls\u2026","version":"1.0","author_name":"lethevert","blog_url":"https://lethevert.hatenadiary.org/","provider_url":"https://hatena.blog","height":"190","provider_name":"Hatena Blog","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Flethevert.hatenadiary.org%2Fentry%2F20070812%2Fp1\" title=\"Concurrent Clean : Finger trees : listToTree - lethevert is a programmer\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","url":"https://lethevert.hatenadiary.org/entry/20070812/p1","published":"2007-08-12 00:00:07","categories":[],"title":"Concurrent Clean : Finger trees : listToTree","width":"100%","author_url":"https://blog.hatena.ne.jp/lethevert/","blog_title":"lethevert is a programmer"}