Instead of
t.sort(do(a as int, b as int)=a.compareTo(b))
t.sort( { a,b | a.compareTo(b) } )
and if we want the type
t.sort( { a as int,b as int | a.compareTo(b) } )
Not sure about anonymous methods, but maybe
.callArithmeticOp(3, 4, {a as int, b as int|
return a * b})
These are just suggestions. I like my lambda example (inspired/stolen from boo), but not necessarily the anonymous methods.
What are yours thoughts? Maybe we could have something similar to C#, with the => operator.
On a side note, what's the status of Linq in Cobra?