(rontolisp) docs
← Syntax and definition

loop

(loop [binding...] body...)

Binds like let -- the inits are sequential and the patterns destructure -- and evaluates the body, which may (recur ...) back to the bindings with new values. Lowers to a labels self call, so the interpreter's tail calls make the repetition constant-stack.

A closure the body creates captures its own iteration's value, like the oracle's -- each recur is a fresh call with fresh parameters: