Expression closures - use-cases for shortcut lambda syntax (blocks)

Chris Pine chrispi at
Tue Mar 20 13:30:25 PDT 2007

> On 17/03/07, Vassily Gavrilyak <gavrilyak at> wrote:
>>"file.txt") do  | file
>>    file.process()
>> end

Should be:"file.txt") do |file| ... end

On Sat, 17 Mar 2007 02:37:13 +0100, Igor Bukanov <igor at> wrote:
> Ruby's do construction is also a loop, not a lambda

Not true at all; it's every bit a lambda and not at all a loop.  The above  
is the same as:

   file_func = lambda {file.process()}"file.txt", &file_func)

Not really all that relevant, but just couldn't let it pass.  :)


More information about the Es4-discuss mailing list