def look.step

ezx@1.11.0.0 · src/doctor/world.bend:115

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

115# this answer when it is the question's, otherwise the rest's. The rest
116# arrives as a thunk, so the first hit ends the scan.
117def look.step(hit: Bool, answer: Answer, rest: Unit -> Heard) -> Heard:
118  match hit:
119    case True{}:
120      Heard{answer}
121    case False{}:
122      rest(Unit{})

Uses (4)

Used by (1)