3 ms·
Haskell possesses similar syntax, save that one must prefix an anonymous function with \, like so: \x -> x * 42 It's possible as well to use it bare like
by jarcane 12y ago
Haskell possesses similar syntax, save that one must prefix an anonymous function with \, like so:
\x -> x * 42
It's possible as well to use it bare like that, but only in very particular places, so it's generally much clearer to use it wrapped in parens:
(\x -> x * 42)
Perhaps some similar convention would make it clearer where a lambda is being used in .js?