def look.step

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

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

733# one step of a lookup, with the head's answer in hand. The rest arrives as a
734# thunk, so a hit ends the search.
735def look.step(hit: Bool, text: String, rest: Unit -> Maybe<&2, String>) -> Maybe<&2, String>:
736  match hit:
737    case True{}:
738      Some{text}
739    case False{}:
740      rest(Unit{})

Uses (4)

Used by (1)