[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Another example for syntactically lightweight closures
- From: "steve donovan" <steve.j.donovan@...>
- Date: Wed, 6 Feb 2008 15:59:49 +0200
On Feb 6, 2008 3:43 PM, Miles Bader <email@example.com> wrote:
> mydata:sort ( |a,b|(upcase (a) > upcase (b)) )
> mydata:collect ( |x| (x.shoesize > x.age/2) )
I tend to prefer this syntax to the more wordy one, but then maybe the
word 'in' is the problem?
mydata:collect( (a,b) to (upcase(a) > upcase(b)) )?
sqr = (x) to (x*x)
'becomes' is better, but more typing. '=>' is conventional, but is
Or even 'is'? But that seems to be abusing the English language, perhaps.