{"provider_url":"https://hatena.blog","title":"class \u3092\u4f5c\u3063\u3066\u307f\u308b\u3002","width":"100%","author_url":"https://blog.hatena.ne.jp/sirocco/","blog_url":"https://sirocco.hatenadiary.org/","categories":["Haskell"],"type":"rich","height":"190","published":"2011-01-30 19:51:47","blog_title":"sirocco \u306e\u66f8\u3044\u3066\u3082\u3059\u3050\u306b\u5fd8\u308c\u308b\u30e1\u30e2","image_url":null,"author_name":"sirocco","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsirocco.hatenadiary.org%2Fentry%2F20110130%2F1296384707\" title=\"class \u3092\u4f5c\u3063\u3066\u307f\u308b\u3002 - 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>","provider_name":"Hatena Blog","version":"1.0","url":"https://sirocco.hatenadiary.org/entry/20110130/1296384707","description":"\u30b8\u30a7\u30cd\u30ea\u30c3\u30af\u306a\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u3066\u307f\u307e\u3059\u3002 data Person = Japanese String | English String String sayHello :: Person -> String sayHello (English a b) = a++\",\"++b++\"!!\" sayHello (Japanese a) = a++\",\"++a++\",\"++a ghci> sayHello (Japanese \"hello\") -- => \"hello,hello,hello\" ghci> sayHello (English \"hello\" \"world\") -- => \"hello,w\u2026"}