Implicit return syntax error

John Nilsson john at milsson.nu
Wed Dec 16 12:27:12 PST 2009


On Wed, Dec 16, 2009 at 9:50 AM, Alex Blewitt <alex.blewitt at gmail.com>wrote:

> Python:
>
>  >>> sq = lambda x: x**2
>  >>> sq(4)
> 16


Speaking of terseness.

What do people think of a syntax like this:

#int(int,int) op = (*)

or

int prod = intList.reduce(*)


In a similar vein

String s = someList.map(.toString()).reduce(+","+)


BR,
John


More information about the lambda-dev mailing list