REPL tour
zzZZ REPL — type :help for commands, Ctrl+D to exitzz>Session basics
Section titled “Session basics”zz> x := 4242zz> x + 143zz> func add(a: int, b: int) -> int { a + b }<func add>zz> add(3, 4)7- Bindings persist across snippets.
- Each snippet is type-checked before it runs.
- Continuation prompt is
|for open parens or trailing operators.
Commands
Section titled “Commands”| Command | Effect |
|---|---|
:help |
help |
:quit |
exit (Ctrl+D also works) |
:type expr |
show inferred type |
:clear |
drop all bindings |
- Use
:typewhen inference surprises you::type [1, 2]is[int]. - Paste multi-line closures and pipelines directly; the REPL waits for the close.
- REPL is VM-backed and ideal for stdlib probing (
str.*,vec.*,json.*). For file-level behavior (modules,zz.tomldeps) usezz run/zz test.
Next: Language overview.