Skip to main content

scan

Function scan 

Source
pub fn scan<F>(
    core: &Core,
    binding: &Arc<dyn OperatorBinding>,
    source: NodeId,
    fold: F,
    seed: HandleId,
) -> OperatorRegistration
where F: Fn(HandleId, HandleId) -> HandleId + Send + Sync + 'static,
Expand description

scan(source, fold, seed) — left-fold emitting each new accumulator.

Required seed: there is no seedless mode where the first value becomes the accumulator (matches TS legacy). The seed handle must be pre-registered by the caller with the binding (so it has a real HandleId). Core takes one retain on the seed for the ScanState slot’s lifetime.