{"categories":["Haskell"],"published":"2011-12-06 11:23:30","title":" Haskell \u30672\u5206\u63a2\u7d22\u6728","author_url":"https://blog.hatena.ne.jp/sirocco/","blog_url":"https://sirocco.hatenadiary.org/","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u57fa\u790e \u7b2c17\u7ae0 \u300c\u518d\u5e30\u7684\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u300d\u306e\u4e8c\u5206\u63a2\u7d22\u6728\u3092Haskell \u3067\u3084\u3063\u3066\u307f\u307e\u3057\u305f\u3002 import Test.HUnit data Tree_d = Empty | Leaf Int | Node (Tree_d, Int, Tree_d) deriving (Eq,Show) insertTree :: Tree_d -> Int -> Tree_d -- \u7a7a\u306e\u6728\u3060\u3063\u305f\u3089 Leaf \u3092\u4f5c\u3063\u3066\u8fd4\u3059\u3002 insertTree Empty dat = Leaf dat -- Leaf \u3060\u3063\u305f\u3089 -- Leaf \u306e\u5024\u3088\u308a\u5c0f\u3055\u3051\u308c\u3070\u5de6\u306b\u8ffd\u52a0\u3059\u308b\u5024\u3001\u4e2d\u592e\u306b\u5143\u306eLeaf \u306e\u5024\u3001\u53f3\u304cEmpt\u2026","provider_url":"https://hatena.blog","width":"100%","author_name":"sirocco","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsirocco.hatenadiary.org%2Fentry%2F20111206%2F1323138210\" title=\" Haskell \u30672\u5206\u63a2\u7d22\u6728 - 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>","height":"190","provider_name":"Hatena Blog","blog_title":"sirocco \u306e\u66f8\u3044\u3066\u3082\u3059\u3050\u306b\u5fd8\u308c\u308b\u30e1\u30e2","url":"https://sirocco.hatenadiary.org/entry/20111206/1323138210","version":"1.0","image_url":null}