Function object: Difference between revisions

Content deleted Content added
m In Ruby: Fix spelling of RubyKaigi
Line 666:
</source>
 
Now, method <code>foo</code> can be a function object, i.e. a <code>Proc</code>, via <code>&:foo</code> and used via <code>takes_a_functor(&:foo)</code>. <code>Symbol.to_proc</code> was officially added to Ruby on June 11, 2006 during RubyKaiga2006RubyKaigi2006. [https://web.archive.org/web/20060820025032/http://redhanded.hobix.com/cult/symbolTo_procExonerated.html]
 
Because of the variety of forms, the term Functor is not generally used in Ruby to mean a Function object.