{"published":"2014-04-20 00:00:00","height":"190","provider_name":"Hatena Blog","categories":["Ruby","tips"],"version":"1.0","title":"lambda/Proc\u3068\u5909\u6570\u306e\u95a2\u4fc2\uff08\u30af\u30ed\u30fc\u30b8\u30e3\uff09","author_name":"riocampos","author_url":"https://blog.hatena.ne.jp/riocampos/","blog_title":"\u5225\u9928 \u5b50\u5b50\u5b50\u5b50\u5b50\u5b50\uff08\u306d\u3053\u306e\u3053\u3053\u306d\u3053\uff09\u306f\u3066\u30d6\u30ed\u90e8","type":"rich","blog_url":"https://riocampos-tech.hatenablog.com/","width":"100%","url":"https://riocampos-tech.hatenablog.com/entry/20140420/lambda_proc_and_variables","description":"\u30af\u30ed\u30fc\u30b8\u30e3 \u30af\u30ed\u30fc\u30b8\u30e3\u306f\u30d6\u30ed\u30c3\u30af\u306e\u5185\u90e8\u306b\u5909\u6570\u3092\u4fdd\u6301\u3067\u304d\u308b\u3001\u3068\u3044\u3046\u3053\u3068\u306f\u3044\u308d\u3093\u306a\u3068\u3053\u308d\u3067\u66f8\u3044\u3066\u3042\u308a\u307e\u3059\u3002 Ruby\u306e\u30d6\u30ed\u30c3\u30af\u306f\u305d\u308c\u81ea\u8eab\u3092\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u305d\u3046\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u30e1\u30e2\u30ea\u4e0a\u306b\u72ec\u7acb\u3057\u3066\u5b58\u5728\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3002 lambda { n += 1 } # => #<Proc:0x0001f57c@-:27> \u30d6\u30ed\u30c3\u30af\u3092\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5316\u3057\u305f\u3082\u306e\u306fProc\u30af\u30e9\u30b9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067\u3042\u308a\u3001call\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3076\u3053\u3068\u306b\u3088\u3063\u3066\u30d6\u30ed\u30c3\u30af\u5185\u306e\u624b\u7d9a\u304d\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3002\u305d\u3057\u3066\u3053\u306e\u5834\u5408\u3067\u3082\u30d6\u30ed\u30c3\u30af\u304c\u305d\u306e\u5916\u5074\u3067\u5b9a\u7fa9\u3055\u308c\u305f\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u3092\u53c2\u7167\u3067\u304d\u308b\u3068\u3044\u3046\u6027\u8cea\u306f\u4fdd\u305f\u308c\u308b\u3002\u3053\u306e\u3088\u3046\u306a\u30d6\u30ed\u30c3\u30af\u306e\u6027\u8cea\u306f\u30af\u30ed\u30fc\u30b8\u30e3\u3068\u547c\u2026","image_url":null,"provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Friocampos-tech.hatenablog.com%2Fentry%2F20140420%2Flambda_proc_and_variables\" title=\"lambda/Proc\u3068\u5909\u6570\u306e\u95a2\u4fc2\uff08\u30af\u30ed\u30fc\u30b8\u30e3\uff09 - \u5225\u9928 \u5b50\u5b50\u5b50\u5b50\u5b50\u5b50\uff08\u306d\u3053\u306e\u3053\u3053\u306d\u3053\uff09\u306f\u3066\u30d6\u30ed\u90e8\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}