Functions and callable values
Functions declare complete signatures. Named functions and capture-free
anonymous functions have Callable types; explicit captures create concrete
closure environments. Reusable calls borrow an environment, while consuming
calls transfer it into the body.
- Signatures, methods, and calls
- Named and anonymous function values
- Closure environments
- Consuming and stored closures
- Boxed callable environments
- Recursion and tail calls
Generic constraints allow one callback API to accept different concrete callable representations without erasing their types.