{"description":"-- \u9006\u30dd\u30fc\u30e9\u30f3\u30c9\u8a18\u6cd5\u8a55\u4fa1\u5668 -- calc :: String -> [Float] calc = foldl f [] . words where f (x:y:zs) \"+\" = y+x:zs f (x:y:zs) \"-\" = y-x:zs f (x:y:zs) \"*\" = y*x:zs f (x:y:zs) \"/\" = y/x:zs f xs y = read y : xs \u5206\u304b\u308a\u3084\u3059\u304f\u5909\u6570\u540d\u3092\u5909\u3048\u3066\u307f\u308b\u3002 calc :: String -> [Float] calc string = foldl fnc [] (words string) where -- \u6f14\u7b97\u5b50\u306e\u3068\u304d\u306f\u30b9\u30bf\u30c3\u30af\u304b\u3089\u2026","image_url":null,"published":"2009-06-06 06:06:26","url":"https://sirocco.hatenadiary.org/entry/20090606/1244235986","provider_name":"Hatena Blog","blog_url":"https://sirocco.hatenadiary.org/","title":"http://ja.wikipedia.org/wiki/Haskell \u306e\u9006\u30dd\u30fc\u30e9\u30f3\u30c9\u8a18\u6cd5\u8a55\u4fa1\u5668","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsirocco.hatenadiary.org%2Fentry%2F20090606%2F1244235986\" title=\"http://ja.wikipedia.org/wiki/Haskell \u306e\u9006\u30dd\u30fc\u30e9\u30f3\u30c9\u8a18\u6cd5\u8a55\u4fa1\u5668 - 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>","author_url":"https://blog.hatena.ne.jp/sirocco/","type":"rich","provider_url":"https://hatena.blog","version":"1.0","categories":["Haskell"],"author_name":"sirocco","width":"100%","height":"190","blog_title":"sirocco \u306e\u66f8\u3044\u3066\u3082\u3059\u3050\u306b\u5fd8\u308c\u308b\u30e1\u30e2"}