def look.step

ezx@1.11.0.0 · src/pub/world.bend:87

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

87# this answer when it is the question's, otherwise the rest's. The rest
88# arrives as a thunk, so the first hit ends the scan.
89def look.step(hit: Bool, answer: Answer, rest: Unit -> Heard) -> Heard:
90  match hit:
91    case True{}:
92      Heard{answer}
93    case False{}:
94      rest(Unit{})

Uses (4)

Used by (1)