Function reference
Every function and value of the language by namespace, with signature, effects, cost and tested examples; made from the registry.
This reference is made from the engine's registry, so it lists exactly the names the checker accepts, with the parameters it accepts. Each page is one namespace. For every function it gives the signature (optional parameters in brackets), what it does to the script (its effects), when it runs (its phase), what it costs and the tested examples that use it.
How to read an entry#
- Effects. A function with no effect depends on its arguments only. A function that keeps a state (a moving average, a request) has one state for each place it is written, and advances it when execution reaches that place; this is why such a call may not stand where it might not run (see Diagnostics, E3302 and W3302).
- Phase. Most functions run on every bar. Declarations and settings run once, in the setup.
- Cost. Every call spends operations from a budget of 500,000 for each bar and 600,000,000 for a run. A call that keeps a state also holds memory; a call that builds a collection or a text is counted in the memory ledger. See Limits and budgets.
- Examples. The examples are programs that are compiled and run on synthetic seeded data every time the documentation is built.