On Wed, Jul 11, 2012 at 12:48 AM, Michael Sokol <[email protected]> wrote:
>> class Object
>>  def to_lambda(method, *a)
>>    lambda {|*b| send(method, *a, *b)}
>>  end
>> end
>
> Correct me if I'm wrong (I've had a glass too much), but this looks like 
> partially applied functions to me. It's used all over the place in functional 
> programming, e.g. currying.

There are some similarities but the underlying object is usually not a
lambda as it would be for currying.  I prefer to look at it as a
convenient way to bundle an object with a method call and its
arguments for later use.

Kind regards

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

-- You received this message because you are subscribed to the Google Groups 
ruby-talk-google group. To post to this group, send email to 
[email protected]. To unsubscribe from this group, send email 
to [email protected]. For more options, visit this 
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en

Reply via email to