Modules
Organize code into modules and expose a clean public surface.
Use modules to split language/runtime concerns cleanly.
module math
fn square(n: Int) -> Int {
n * n
}Import from other files:
import math.square
print(square(4))Guidelines
- Keep module APIs explicit.
- Avoid broad wildcard exports.
- Favor many small modules over one giant namespace.