Lambdas
Lambdas are anonymous functions. They use fn(...) -> ... inside an expression.
const double = fn(x: Int) -> x * 2
Lambdas can take no parameters.
const hello = fn() -> "Hello Donna"
They can take multiple parameters.
const add = fn(x: Int, y: Int) -> x + y
Lambda types use the same shape.
fn make_counter() -> fn(Int) -> Int:
fn(value: Int) -> value + 1
Use lambdas for small local behavior. Use a named function when the behavior is reused, public, or worth documenting.