def when
import yaml-for-bend@0.1.1.0/scan.bend as Scanimport Base
124# +yes+ when +hit+, else +no+; only the one chosen runs.
125def when(-A: Type, hit: Bool, yes: Unit -> A, no: Unit -> A) -> A:
126 match hit:
127 case True{}:
128 yes(Unit{})
129 case False{}:
130 no(Unit{})