def seen.has.step

ezx@1.11.0.0 · src/pkg/pkg.bend:483

import ezx@1.11.0.0/src/pkg/pkg.bend as Pkg
import Base

483# one step of the scan, with the head's answer in hand. `Bool.or` is an
484# ordinary function and so reduces both of its sides, which means a scan
485# written with it never stops at the name it was looking for. The rest of the
486# scan arrives as a thunk and only the arm that wants it applies it. This list
487# grows by one with every file the walk reaches, so the scan is the inner half
488# of a quadratic and stopping early halves it.
489def seen.has.step(here: Bool, rest: Unit -> Bool) -> Bool:
490  match here:
491    case True{}:
492      True{}
493    case False{}:
494      rest(Unit{})

Uses (2)

Used by (1)