Anonymous functions

As well as module-level named functions, Gleam has anonymous function literals, written with the fn() { ... } syntax.

Anonymous functions can be used interchangeably with named functions.

Anonymous functions can reference variables that were in scope when they were defined, making them closures.