{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fxyuyux.hatenadiary.org%2Fentry%2F20120907%2F1347005470\" title=\"Ruby\u3067\u30dd\u30a4\u30f3\u30c8\u30d5\u30ea\u30fc - 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>","author_name":"xyuyux","url":"https://xyuyux.hatenadiary.org/entry/20120907/1347005470","type":"rich","title":"Ruby\u3067\u30dd\u30a4\u30f3\u30c8\u30d5\u30ea\u30fc","blog_url":"https://xyuyux.hatenadiary.org/","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/xyuyux/","description":"\u307e\u305a\u306f\u666e\u901a\u306b\u95a2\u6570\u5b9a\u7fa9\u3059\u308b\u3068\u3053\u3093\u306a\u3093\u3067\u3059\u3088\u306d\uff1f def g(x) end def f(y) end def foo(x) f(g(x)) end foo\u95a2\u6570\u3092\u30dd\u30a4\u30f3\u30c8\u30d5\u30ea\u30fc\u306b\u3057\u3066\u307f\u307e\u3059\u3002 \u307e\u305a\u306f\u3001\u95a2\u6570\u5408\u6210 def foo(x) (method(:f) << method(:g).(x) #\u3082\u3057\u304f\u306f ->x { f (g x) } end \u5408\u6210\u3057\u305f\u306e\u3067(method(:f) \u3042\u3068\u306f(x)\u3092\u6d88\u3059\u3060\u3051\u3067\u3059\u3002 def foo (method(:f) << method(:g) end foo\u304b\u3089\u5f15\u6570\u3067\u3042\u308b(x)\u304c\u6d88\u3048\u305f\uff01\uff01\uff1f \u3053\u308c\u3060\u3051\u3067\u3059\u3002(\u8ab0\u5f97 \u307e\u3041\u547c\u3073\u5143\u3067 foo.(1) #\u3082\u3057\u304f\u306f foo[1] \u2026","categories":["Ruby"],"height":"190","published":"2012-09-07 17:11:10","width":"100%","provider_name":"Hatena Blog","version":"1.0","blog_title":"xyuyux\u306e\u65e5\u8a18","image_url":null}