{"version":"1.0","provider_name":"Hatena Blog","categories":["Scheme","Ruby"],"type":"rich","blog_title":"\u30dc\u30af\u30ce\u30b9","blog_url":"https://boxnos.hatenablog.com/","provider_url":"https://hatena.blog","author_name":"tanakaBox","height":"190","width":"100%","title":" \u7573\u307f\u8fbc\u307f\u95a2\u6570\u306e\u30e1\u30e2","description":"Ruby\u306finject,Scheme\u306freduce\u307e\u305f\u306fapply\u30021\u304b\u308910\u307e\u3067\u8db3\u3057\u3066\u307f\u308b\u3002 Ruby inject\u3057\u3066\u307f\u308b\u3002 (1..10).inject {|sum, i| sum + i} # => 55 \u3046\u301c\u3093\u3002\u308f\u304b\u308a\u306b\u304f\u3044\u306a\u3002 Scheme(Gauche) reduce\u3067 (use srfi-1) ; iota\u7528 (reduce + 0 (iota 10 1)) ; 55 srfi-1\u306efold\u3092\u4f7f\u3046\u3002 (fold + 0 (iota 10 1)) 55 cons\u3068\u4e00\u7dd2\u306b\u4f7f\u3046\u3068\u9006\u9806\u306b\u306a\u3063\u3061\u3083\u3046\u306e\u3067\u3001\u500b\u4eba\u7684\u306b\u306f\u3001fold-right\u304c\u304a\u6c17\u306b\u5165\u308a\u3002 JavaScript 1.8\u304b\u3089re\u2026","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fboxnos.hatenablog.com%2Fentry%2F20071012%2F1192132760\" title=\" \u7573\u307f\u8fbc\u307f\u95a2\u6570\u306e\u30e1\u30e2 - \u30dc\u30af\u30ce\u30b9\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2007-10-12 04:59:20","url":"https://boxnos.hatenablog.com/entry/20071012/1192132760","author_url":"https://blog.hatena.ne.jp/tanakaBox/"}