{"type":"rich","blog_title":"Camera Obscura","author_name":"obelisk2","provider_name":"Hatena Blog","width":"100%","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2016%2F03%2F03%2F091218\" title=\"\u30af\u30ed\u30fc\u30b8\u30e3\u306e\u52d5\u4f5c - Camera Obscura\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"Ruby \u306e lambda \u306f\u30af\u30ed\u30fc\u30b8\u30e3\u3067\u3059\u3002\u30af\u30ed\u30fc\u30b8\u30e3\u306e\u52d5\u4f5c\u306f\u3001\u521d\u5fc3\u8005\u306b\u306f\u306a\u304b\u306a\u304b\u3080\u305a\u304b\u3057\u3044\u3002\u3061\u306a\u307f\u306b\u86c7\u8db3\u3067\u3059\u304c\u3001lambda {|a, b| ..} \u3068 ->(a, b) {..} \u3068\u306f\u540c\u3058\u3053\u3068\u3067\u3059\u3002 def a(fn) b = 100 fn[5] p b.object_id #=>201 end b = 1 p b.object_id #=>3 f = ->(i) {p (b + i).to_s} f[2] #=>\"3\" a(f) #=>\"6\" b = 40 f[10] #=>\"50\" a(f) #=>\"45\" p b.object_id #=>81 \u4e0d\u601d\u8b70\u306a\u611f\u3058\u3060\u306a\u3002lambda \u5185\u306e\u2026","blog_url":"https://obelisk.hatenablog.com/","version":"1.0","height":"190","provider_url":"https://hatena.blog","published":"2016-03-03 09:12:18","author_url":"https://blog.hatena.ne.jp/obelisk2/","url":"https://obelisk.hatenablog.com/entry/2016/03/03/091218","title":"\u30af\u30ed\u30fc\u30b8\u30e3\u306e\u52d5\u4f5c","categories":["Ruby"]}