Closures
| CASM mnemonic | CandleVM opcode | Operands | Behavior |
|---|---|---|---|
closure_new | NewClosure | destination, function [, capture ...] | Takes a function-reference register followed by up to 8 capture registers. CandleC infers and encodes the capture count. |
At runtime, CandleVM requires the number of supplied captures to match the function's declared capture count, then creates a Closure. See CandleVM closure opcodes.