Skip to content
PACKAGES

operators.reduce

Kind: function

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

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

Accumulate as :func:scan does and send nothing until src completes; then send the result with COMPLETE in one array. An empty source gives seed (O-reduce).

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