Skip to content

Closures ​

CASM mnemonicCandleVM opcodeOperandsBehavior
closure_newNewClosuredestination, 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.

Built for the Candle ecosystem · Powered by VitePress.