scanLog()
Standalone incremental scan over a reactive log. Equivalent to log.scan(initial, step);
provided for pipe-builder and helper-composition call sites.
Import
Section titled “Import”import { scanLog } from "@graphrefly/ts/data-structures";Signature
Section titled “Signature”function scanLog( log: ReactiveLog<T>, initial: A, step: (acc: A, value: T) => A,): Node<A>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
log | ReactiveLog<T> | log value used by the helper. |
initial | A | initial value used by the helper. |
step | (acc: A, value: T) => A | step value used by the helper. |
Returns
Section titled “Returns”A Node<A> value.
Example
Section titled “Example”import { scanLog } from "@graphrefly/ts/data-structures";Source
Section titled “Source”packages/ts/src/graph/data-structures/reactive-log.ts