[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- 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 <miles@gnu.org> 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?
How about
mydata:collect( (a,b) to (upcase(a) > upcase(b)) )?
sqr = (x) to (x*x)
'becomes' is better, but more typing. '=>' is conventional, but is
more punctuation.
Or even 'is'? But that seems to be abusing the English language, perhaps.
steve d.