{"author_url":"https://blog.hatena.ne.jp/osyo-manga/","title":"Vim script \u306e closure \u3092\u4f7f\u3046\u3079\u304d\u3067\u306f\u306a\u3044\u4f7f\u3044\u65b9","width":"100%","author_name":"osyo-manga","description":"Vim \u306e patch 7.4.2120 \u306b\u304a\u3044\u3066 :function \u306e\u5f15\u6570\u306b closure \u3068\u3044\u3046\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u8ffd\u52a0\u3055\u308c\u305f\u3002 \u3053\u308c\u306f\u95a2\u6570\u5185\u304b\u3089\u95a2\u6570\u5916\u306e\u5909\u6570\u3092\u53c2\u7167\u3059\u308b\u305f\u3081\u306e\u6a5f\u80fd\u3067\u3042\u308b\u3002 :func-closure \u306b\u306f\u6b21\u306e\u3088\u3046\u306a\u4f7f\u3044\u65b9\u306e\u4f8b\u304c\u8f09\u3063\u3066\u3044\u308b\u3002 function! Foo() let x = 0 function! Bar() closure let x += 1 return x endfunction return function('Bar') endfunction let F = Foo() echo F() \" => 1 echo F() \" => 2 echo F() \u2026","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsecret-garden.hatenablog.com%2Fentry%2F2016%2F08%2F02%2F224625\" title=\"Vim script \u306e closure \u3092\u4f7f\u3046\u3079\u304d\u3067\u306f\u306a\u3044\u4f7f\u3044\u65b9 - Secret Garden(Instrumental)\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","type":"rich","version":"1.0","url":"https://secret-garden.hatenablog.com/entry/2016/08/02/224625","provider_name":"Hatena Blog","categories":["Vim"],"blog_url":"https://secret-garden.hatenablog.com/","published":"2016-08-02 22:46:25","blog_title":"Secret Garden(Instrumental)","image_url":null,"height":"190"}