{"categories":["Haskell"],"published":"2013-03-16 04:04:30","provider_url":"https://hatena.blog","width":"100%","blog_title":"by shigemk2","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.shigemk2.com%2Fentry%2F20130316%2F1363374270\" title=\"Point\u30c7\u30fc\u30bf\u578b\u3067\u5f62\u3092\u6574\u3048\u308b - by shigemk2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/shigemk2/","image_url":null,"provider_name":"Hatena Blog","title":"Point\u30c7\u30fc\u30bf\u578b\u3067\u5f62\u3092\u6574\u3048\u308b","blog_url":"https://www.shigemk2.com/","author_name":"shigemk2","type":"rich","url":"https://www.shigemk2.com/entry/20130316/1363374270","description":"-- \u7a7a\u9593\u306e\u70b9\u3092\u8868\u3059\u4e2d\u9593\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u4f5c\u308b -- \u305d\u3046\u3059\u308b\u3068\u3082\u3063\u3068\u56f3\u5f62\u3092\u3082\u3063\u3068\u308f\u304b\u308a\u3084\u3059\u304f\u3067\u304d\u308b\u304a data Point = Point Float Float deriving (Show) data Shape = Circle Point Float | Rectangle Point Point deriving (Show) area :: Shape -> Float area (Circle _ r) = pi * r ^ 2 area (Rectangle (Point x1 y1) (Point x2 y2)) = (abs $ x2 - x1) * (abs $ y2 - y\u2026","version":"1.0"}