Lambda ( => )
Unnamed function.
Syntax
(p: Type) => expression
Description
Written in the format (parameter) => expression. Commonly used in places like map/filter.
Example
Loading editor…
This language is for reference/learning only — copy the code and try it in your own environment.
Expected output
36 List(2, 4, 6)
When to use?
map/filter callbacks, short utility functions.