From: Martin DeMello Date: 2005-03-20T05:14:54+09:00 Subject: Re: Paul Graham recommends Ruby Navindra Umanee wrote: > > Proper OO? Um, well how can you justify: > > a = [1, 2] > a[1] > > but not: > > a = lambda{|x|x*2} > a(1) Simple - [] is a method and () isn't :) a[1] works nicely for lambdas too, btw (not that I wouldn't like to see a(1), of course). also lambda {|i| i+1}[2] #=> 3 martin