From: Martin DeMello Date: 2006-11-17T20:21:10+09:00 Subject: Re: #returning and #tap On 11/17/06, dblack@wobblini.net wrote: > > I wonder if there's some name that embodies the fact that the object > is going to come back from this method call. The temporal ones (then, > and_then, etc.) sound kind of self-evident ("Well, of course the next > thing happens 'then'," my brain says). Good point! I thought of "pipe" but even that doesn't say that it modifies and returns self. Maybe "apply": string.split(/\s/).apply {|i| i.pop}.whatever. Or even "modify". > Perhaps that was the reasoning > behind "tap", though "tap" doesn't communicate much to me. I'm not > sure. 'tap' had a different intent, though - "tee off the object without disturbing it" - even if it did the same thing in the end. So you would typically take a.foo.bar.baz.quux... and drop in a tap, a.foo.bar.tap {|i| puts "hi mom! this is #{i}"}.baz.quux, and take care not to modify i destructively. martin