{"provider_name":"Hatena Blog","type":"rich","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/reiro/","height":"190","blog_url":"https://reiro.hatenadiary.org/","url":"https://reiro.hatenadiary.org/entry/20080302/mapcar","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Freiro.hatenadiary.org%2Fentry%2F20080302%2Fmapcar\" title=\"Smalltalk\u3067mapcar - \u73b2\u74cf\u5eb5\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"Smalltalk\u3067mapcar","width":"100%","categories":["Smalltalk"],"description":"Lisp\u306emapcar\u306e\u771f\u4f3c\u4e8b\u3002\u305f\u3060\u3001Lisp\u306emapcar\u306f\u30ea\u30b9\u30c8\u3092\u8907\u6570\u500b\u53d6\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u3093\u3060\u3088\u306d\u3002 !Vector defineMethod: input! mapcar: fn |result| result := Vector new. self do:[:el|result add: (fn value: el)]. ^result. ! ! {1.2.3} mapcar: [:el|el+3].! {4.5.6}\u8907\u6570\u914d\u5217\u53d6\u308c\u308b\u7248\u3002\u306a\u3093\u304b\u7f8e\u3057\u304f\u306a\u3044\u306a\u3002\u7279\u306b\uff11\u914d\u5217\u306e\u6642\u306b\uff12\u91cd\u306b\u3057\u306a\u304d\u3083\u3044\u3051\u306a\u3044\u8fba\u308a\u304c\u3002 !Vector defineMethod: input! mapcar: fn |re\u2026","version":"1.0","blog_title":"\u73b2\u74cf\u5eb5","published":"2008-03-02 00:00:00","author_name":"reiro","image_url":null}