7 Jan
2015
7 Jan
'15
8:20 a.m.
On 2015-01-07, at 2:11, Andrew Barnert
[...]
That's the key. A function is a way to wrap a sequence of statements (the function body) so it can be used in an expression (a function call). Because JavaScript lets you define functions (with full statement syntax) in expressions, that gives you a way to "demote" an expression inline, while Python can only do so out-of-line. At the core, this is what all of the multiline lambda attempts and similar proposals are trying to accomplish.
Thanks. This has given me an idea that's on a slightly different tangent than this one. Will write it up (this time with some actual runnable code) when I get home tonight. Regards, Yawar