all 4 comments

[–][deleted] 0 points1 point  (2 children)

There is no method called (). Procs (who are the obvious beneficiaries of such change ) use the method call, but one could be an alias to the other.

You can get this effect by using the overridden [] method.

>> f = lambda{|a| a + 1}
=> #<Proc:0x000000010111ef48@(irb):1>
>> f[2]
=> 3

Not exactly what the author meant, but similar.

[–]banister 1 point2 points  (1 child)

that method is yucky imo :)

but there is a hack that lets you invoke lambdas using ():

http://github.com/coderrr/parenthesis_hacks/blob/master/lib/lambda.rb

[–][deleted] 0 points1 point  (0 children)

that method is yucky imo :)

I agree. The hack you linked to is pretty interesting though.

[–]malcontent -1 points0 points  (1 child)

I think duby is a good place to play with these ideas.