Lambda ( \ )
Nameless (anonymous) function.
Syntax
\x -> expression
Description
An anonymous function is written in the form \x -> expression. Usually passed as an argument to places like map/filter.
Example
Loading editor…
Expected output
[2,3,4]
When to use?
map/filter callbacks, short utility functions.