def look.step

ezx@1.11.0.0 · src/fetch/world.bend:127

import ezx@1.11.0.0/src/fetch/world.bend as World
import Base

127# this answer when it is the question's, otherwise the rest's. The rest
128# arrives as a thunk, so the first hit ends the scan.
129def look.step(hit: Bool, answer: Answer, rest: Unit -> Heard) -> Heard:
130  match hit:
131    case True{}:
132      Heard{answer}
133    case False{}:
134      rest(Unit{})

Uses (4)

Used by (1)