3 ms·
Fine, not technically lambdas, but still: function bodies declared inline in function calls. This provides great flexibility in higher-order functions. > Ther
by Pxtl 9y ago
Fine, not technically lambdas, but still: function bodies declared inline in function calls. This provides great flexibility in higher-order functions.
> There is no sane way you could embed statements into an expression with whitespace-based block syntax.
Ruby does it. Of course, Ruby has a limitation that a function call may only have one "block", but still - Ruby blocks are statements embedded into an expression in a whitespace-based syntax.
- pseudalopex 9y agoRuby has explicit syntax to end groups of statements. Python is equally powerful when it comes to higher-order functions; it just enforces a flatter, more explicit style.