def stated.step

ezx@1.11.0.0 · src/init/plan.bend:72

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

72# one step of a scan that is looking for one hit, with the head's answer in
73# hand. `Bool.or` is an ordinary function and reduces both of its sides, so a
74# scan written with it reads the whole list even when the first line answers.
75# The rest of the scan arrives as a thunk and only the arm that wants it
76# applies it.
77def stated.step(here: Bool, rest: Unit -> Bool) -> Bool:
78  match here:
79    case True{}:
80      True{}
81    case False{}:
82      rest(Unit{})

Uses (2)

Used by (1)