Skip to content
Konjure / spatial intelligence

Unit

← Builtin reference

The single empty value returned by procedures.

Signature

Unit is represented by the payload-free Rust Value::Unit variant and spelled () in the language. A function returning Unit may end without a value or use ret;. Unit is not null, an absent field, or an optional value.

Examples

Return from a procedure

The procedure logs its work; its result is the empty value ().

Tick 0 · 0.00 s⌘ / Ctrl + EnterThis device
main.kj
Loading the language runtime…
Output 0
No output.
Expected output
ready
()

Rust definition

Value::Unit; a Rust enum variant with no payload.

See also