Hi --

On Sun, 20 Mar 2005, Christian Neukirchen wrote:

> Navindra Umanee <navindra / cs.mcgill.ca> writes:
>
>> Christian Neukirchen <chneukirchen / gmail.com> wrote:
>>>> Ruby blocks are just syntactic sugar for a special-case lambda.  Ruby
>>>
>>> Care to elaborate?  What's lacking?
>>
>> Yeah, sorry for being unclear.  I was referring to higher-order
>> functions i.e. Ruby blocks allow you to pass one anonymous lambda to a
>> higher-order function with convenient syntax...  for more than that it
>> gets less convenient.
>
> This apparently got better with the anonymous blocks recently imported
> in CVS, but I didn't try that yet.  It's a restriction by design,
> though.

I'm not sure anything's new in that CVS feature except:

   my_lambda = {|| puts "I am a lambda"}

where the || (with or without a param list) tells you that it's a
lambda rather than a hash.

I'm not a fan of this; I prefer using the lambda keyword.


David

-- 
David A. Black
dblack / wobblini.net