-----Original Message-----
From: Trans [mailto:transfire@gmail.com]
Sent: Thursday, 8 December 2005 2:08 PM
To: ruby-talk ML
Subject: Re: Are my metaprogramming underpants showing?
Hmm.... that does make it trickier b/c when will the chain end? The
only thing I can think of the top of my head is to use an '!'
method to
indicate it.
Flickr.test.echo!
Then you can just return the same Functor-like object collecting the
parts along the way until the '!' is hit.
T.
#####################################################################################
This email has been scanned by MailMarshal, an email content filter.
#####################################################################################
Maybe this makes me sound thick, but then again, enlightenment is the reason I'm posting.
Given that the code below is functionally equivalent, what's beneficial about using a lambda expression? It strikes me as a requirement imposed by using the Functor class more than anything.
class Flickr
def initialize (method = ['flickr']) @method = method
end
Given that the code below is functionally equivalent, what's
beneficial about using a lambda expression?
I don't think there is neccessarily. Functor's just the completely
generic form of this. Making a specifec Functor-like class as you have
here with this Flickr class is ceratinly the way to go.