{"width":"100%","published":"2010-04-22 00:18:04","image_url":null,"author_url":"https://blog.hatena.ne.jp/Naotsugu/","version":"1.0","type":"rich","categories":["Scala"],"height":"190","url":"https://blog1.mammb.com/entry/20100422/1271949484","blog_title":"A Memorandum","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog1.mammb.com%2Fentry%2F20100422%2F1271949484\" title=\"\u95a2\u6570\u306f Function \u30c8\u30ec\u30a4\u30c8\u3067\u3042\u308b - A Memorandum\" 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":"Naotsugu","provider_url":"https://hatena.blog","description":"\u7b2c\u4e00\u7d1a\u95a2\u6570 Scala \u306b\u304a\u3044\u3066\u3001\u95a2\u6570\u306f\u7b2c\u4e00\u7d1a\u95a2\u6570 first-class function \u3067\u3059\u3002\u7b2c\u4e00\u7d1a\u95a2\u6570\u306a\u306e\u3067\u3001\u95a2\u6570\u3092\u5024\u306e\u69d8\u306b\u3057\u3066\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u95a2\u6570\u3092 f \u3068\u3044\u3046\u5024\u3068\u3057\u3066\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002 val f:Int=>Int = x=>x*x println(f(3)) \u7d50\u679c\u306f 9 \u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002 \u4e0a\u8a18\u306f\u4ee5\u4e0b\u3068\u540c\u3058\u610f\u5473\u306b\u306a\u308a\u307e\u3059\u3002 val f:Function[Int, Int] = x=>x*x println(f.apply(3)) f(3) \u306e\u547c\u3073\u51fa\u3057\u306f\u5b9f\u969b\u306b\u306f Function \u578b\u306e apply \u30e1\u30bd\u30c3\u30c9\u306e\u547c\u3073\u51fa\u3057\u3067\u3057\u304b\u306a\u3044\u306e\u3067\u3059\u3002 \u3055\u3089\u306b\u4ee5\u4e0b\u306b\u66f8\u304d\u63db\u3048\u308b\u3053\u3068\u304c\u3067\u2026","title":"\u95a2\u6570\u306f Function \u30c8\u30ec\u30a4\u30c8\u3067\u3042\u308b","blog_url":"https://blog1.mammb.com/","provider_name":"Hatena Blog"}