{"height":"190","author_name":"xyuyux","provider_url":"https://hatena.blog","blog_title":"xyuyux\u306e\u65e5\u8a18","type":"rich","description":"def g ->x, y { x * y }.curry end def f ->y { y * 4 } end def foo(x, y) f.(g.(x).(y)) end \u3042\u3093\u306a\u308f\u3051\u306e\u308f\u304b\u3089\u3093\u3053\u3068\u3057\u306a\u304f\u3066\u3082\u3053\u308c\u3067\u3044\u3051\u305f\u3002 def foo # f.(g.(x).(y)) # (f << g.(x)).(y) # (f.method(:<<) << g).(x).(y) (f.method(:<<) << g) # haskel\u306e(f.).g\u3068\u5927\u4f53\u540c\u3058\u306b\u306a\u3063\u305f end foo.(2).(2) #=> 16 \u95a2\u6570\u5408\u6210\u306e\u307b\u3046\u3082\u03bb\u306b\u3057\u305f\u308a\u3068\u304b\u308f\u3051\u306e\u308f\u304b\u3089\u306a\u3044\u3053\u3068\u3059\u308b\u5fc5\u8981\u306a\u304b\u3063\u305f\u3002","image_url":null,"width":"100%","blog_url":"https://xyuyux.hatenadiary.org/","version":"1.0","categories":["Ruby"],"published":"2012-09-07 20:10:01","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fxyuyux.hatenadiary.org%2Fentry%2F20120907%2F1347016201\" title=\"Ruby\u3067\u30dd\u30a4\u30f3\u30c8\u30d5\u30ea\u30fc\u7d9a\u304d\u306e\u88dc\u8db3 - xyuyux\u306e\u65e5\u8a18\" 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","url":"https://xyuyux.hatenadiary.org/entry/20120907/1347016201","author_url":"https://blog.hatena.ne.jp/xyuyux/","title":"Ruby\u3067\u30dd\u30a4\u30f3\u30c8\u30d5\u30ea\u30fc\u7d9a\u304d\u306e\u88dc\u8db3"}