{"width":"100%","published":"2005-01-18 00:00:00","categories":["Haskell"],"version":"1.0","title":" Tree Monad","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyts.hatenadiary.org%2Fentry%2F20050118%2Fp1\" title=\" Tree Monad - One of the Eight Stones\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","author_name":"yts","type":"rich","image_url":null,"blog_url":"https://yts.hatenadiary.org/","blog_title":"One of the Eight Stones","url":"https://yts.hatenadiary.org/entry/20050118/p1","description":"\u63a2\u7d22\u3068\u306f\u3001\u307e\u305a\u89e3\u306e\u5019\u88dc\u3092\u8449\u3068\u3059\u308b\u6728\u3092\u4f5c\u3063\u3066*1\u3001\u305d\u308c\u304b\u3089\u305d\u306e\u6728\u306e\u679d\u3092\u3042\u308b\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3067\u8fbf\u3063\u3066\u89e3\u3092\u767a\u898b\u3059\u308b\u3053\u3068\u3067\u3042\u308b*2\u3002\u30ea\u30b9\u30c8\u306b\u3088\u308b\u30d0\u30c3\u30af\u30c8\u30e9\u30c3\u30af\u3092\u5229\u7528\u3057\u305f\u63a2\u7d22\u306f\u3001\u6728\u3092\u4f5c\u308b\u7aef\u304b\u3089\u5168\u90e8\u30d5\u30e9\u30c3\u30c8\u306b\u3057\u3066\u6df1\u3055\u512a\u5148\u63a2\u7d22\u3092\u3057\u3066\u3044\u308b\u306e\u3067\u3042\u308b\u3002\u63a2\u7d22\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u5206\u96e2\u3057\u3066\u3001\u63a2\u7d22\u6728\u3060\u3051\u3092\u30e2\u30ca\u30c9\u306b\u3057\u3066\u3057\u307e\u304a\u3046\u3002\u4f8b\u3048\u3070\u3001\u5f15\u6570mk\u3067\u30e2\u30ca\u30c9\u3092\u5207\u66ff\u3048\u3089\u308c\u308b\u63a2\u7d22\u6728\u751f\u6210\u95a2\u6570 test01 mk = do x <- mk [1, 2] if x == 2 then return 100 else do y <- mk [3,3] return y\u306f\u3001\u30ea\u30b9\u30c8\u3060\u3068 *Monad.TestTree> take 5 $ test01 i\u2026","author_url":"https://blog.hatena.ne.jp/yts/","provider_name":"Hatena Blog"}