How Functions Work
In Calyxium, functions are one of the core building blocks of the language. They are among the only statement forms in the language, and they behave much like functions you might see in other programming languages.
A function in Calyxium:
- Defines a reusable block of logic.
- Can accept parameters and return values.
- Works consistently across both simple expressions and more complex programs.
Because Calyxium treats everything as an expression, functions naturally integrate with the rest of the language. This means they can be declared, passed around, and invoked in a straightforward way, without extra boilerplate.