2 ms·
The grouping of expressions is clearer to many readers in the JS example. Unless you've spent a decent amount of time grokking the lambda calculus, the second l
by munificent 14y ago
The grouping of expressions is clearer to many readers in the JS example. Unless you've spent a decent amount of time grokking the lambda calculus, the second line could be any of:
(λx. (λf. f)) x
(λx. (λf. f) x)
(λx. (λf. f x))
The lambda calculus notation is weird. Using "." to separate parameter and body is unusual. The scope of the body isn't obvious.
JS is painfully verbose, but it's a verbose syntax many people have already put the time in to internalize.
- tome 14y agoPut the brackets in the lambda syntax then. It would be unambiguous and still clearer than the Javascript syntax.