Functions
fn is the fundamental computation primitive. All other primitives build on functions.
Functions with needs clauses are effectful — the compiler tracks which side effects they can perform. Functions without needs are pure.
See Language > Functions for complete documentation on:
- Declaration syntax
- Default parameters and named arguments
- Methods on structs
- Lambdas
- Native function bindings
See Effect System for how needs clauses work.