def agrees.step

ezx@1.11.0.0 · src/pub/plan.bend:61

import ezx@1.11.0.0/src/pub/plan.bend as Plan
import Base

61# one line of bend's output weighed. A line that is a name must be ours, and
62# makes the rest of the walk one that has seen a name; any other line is
63# passed over. `Bool.and` builds both of its sides, so the rest of the walk
64# arrives as a function of whether a name was seen and is applied once.
65def agrees.step(name: Bool, same: Bool, seen: Bool, rest: Bool -> Bool) -> Bool:
66  match name:
67    case True{}:
68      Bool.and(same, rest(True{}))
69    case False{}:
70      rest(seen)

Uses (2)

Used by (1)