{"version":"1.0","width":"100%","image_url":null,"published":"2008-06-02 04:45:40","author_name":"Nobuhisa","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnobuhisa.hatenablog.jp%2Fentry%2F20080602%2F1212349540\" title=\"\u30af\u30ed\u30fc\u30b8\u30e3 - Nobuhisa&#39;s diary\" 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/Nobuhisa/","url":"https://nobuhisa.hatenablog.jp/entry/20080602/1212349540","blog_url":"https://nobuhisa.hatenablog.jp/","categories":["Haskell"],"type":"rich","provider_name":"Hatena Blog","height":"190","blog_title":"Nobuhisa's diary","provider_url":"https://hatena.blog","description":"\u3075\u3064\u3051\u308b\u306e4\u7ae0\u306b\u3001\u95a2\u6570\u5185\u3067\u95a2\u6570\u3092\u5b9a\u7fa9\u3059\u308b\u65b9\u6cd5\u304c\u3042\u3063\u305f\u306e\u3067\u30af\u30ed\u30fc\u30b8\u30e3\u3092\u4f5c\u3063\u3066\u307f\u3088\u3046\u3002 closure :: Int -> (Int -> Int) closure x = fn where fn :: Int -> Int fn y = x + y main = do let f = closure 95 print $ f 5 \u3046\u307e\u304f\u884c\u304d\u307e\u3057\u305f\u3002 \u3057\u304b\u3057\u306a\u304c\u3089\u3001\u3053\u308c\u3060\u3051\u3084\u308b\u306a\u3089\u90e8\u5206\u9069\u7528\u3067\u30fb\u30fb\u30fb add :: Int -> Int -> Int add x y = x + y main = do let f = add 5 print $ f 5 \u3055\u3089\u306b+\u81ea\u4f53\u3082\u95a2\u6570\u306a\u306e\u3067 main = do l\u2026","title":"\u30af\u30ed\u30fc\u30b8\u30e3"}