def when
import yaml-for-bend@0.1.1.0/num.bend as Numimport Base
10def when(-A: Type, hit: Bool, yes: Unit -> A, no: Unit -> A) -> A:
11 match hit:
12 case True{}:
13 yes(Unit{})
14 case False{}:
15 no(Unit{})
import yaml-for-bend@0.1.1.0/num.bend as Numimport Base
10def when(-A: Type, hit: Bool, yes: Unit -> A, no: Unit -> A) -> A:
11 match hit:
12 case True{}:
13 yes(Unit{})
14 case False{}:
15 no(Unit{})