Skip to content
PACKAGES

scanLog()

Standalone incremental scan over a reactive log. Equivalent to log.scan(initial, step); provided for pipe-builder and helper-composition call sites.

import { scanLog } from "@graphrefly/ts/data-structures";
function scanLog(
log: ReactiveLog<T>,
initial: A,
step: (acc: A, value: T) => A,
): Node<A>
ParameterTypeDescription
logReactiveLog<T>log value used by the helper.
initialAinitial value used by the helper.
step(acc: A, value: T) => Astep value used by the helper.

A Node<A> value.

import { scanLog } from "@graphrefly/ts/data-structures";

packages/ts/src/graph/data-structures/reactive-log.ts