From: "David A. Black" Date: 2008-06-12T03:40:54+09:00 Subject: [ruby-core:17224] Re: Enumerable::Enumerator#with_memo Hi -- On Thu, 12 Jun 2008, Rick DeNatale wrote: > The way returning is currently used is as a "functional" method, although > it's defined (in Rails) as an instance method of Object, it's almost > invariablly used without an explicit receiver. Its intent is to be the Ruby > version of the K combinator of functional programming. > > As I pointed out, this is really just an iterative variant of the K > combinator, so I'm not sure that returning still isn't an appropriate name. > It's not that we don't have method names in Ruby whose arguments and > semantics change slightly when implemented in different classes, take for > example the various subtle differences in the each method. But each is designed and advertised and documented as something you write in order to plug in to Enumerable (which you don't have to, of course, but that's the main role of each in theory and practice). I don't think "returning" is a great candidate for having a lot of subtle flavors. David -- Rails training from David A. Black and Ruby Power and Light: INTRO TO RAILS June 9-12 Berlin ADVANCING WITH RAILS June 16-19 Berlin ADVANCING WITH RAILS July 21-24 Edison, NJ See http://www.rubypal.com for details and updates!