Skip to content
PACKAGES

operators.scan

Kind: function

Source: src/graphrefly/operators/_accumulate.py:82

scan(g: Graph, src: Node[Any], f: Reducer, seed: object, *, name: str | None = None, recipe: Recipe | None = None)

Send f(acc, v) for every DATA v, starting from seed, each intermediate in the array its input came in; the seed is not sent (O-scan). f returns the next accumulator and does not change the one it is given. Given a recipe that builds f, it can be restored.

The behavior is the root’s operator contract: the operator contracts.