[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: Sat, 9 Feb 2008 09:38:03 +0200
On 2/9/08, Jean-Claude Wippler <jcw@equi4.com> wrote:
> My only suggestion with this would to consider allowing the |... to
> optionally *follow* the call, i.e.
> t:sort() |a,b|( a > b )
Boo (a statically-compiled, inferred-type, Python-like language) does this:
sort(t) do(a:int,b:int):
return a > b
The convention is that if the last arg is a function it can be
specified in this way.
steve d.