def either
import bolt@1.26.0.0/src/lazy/lazy.bend as Lazyimport Base
42# what yes gives when c, else what no gives: a pick whose two branches each
43# recurse, only the one taken run
44def either(-A: Type, cc: Bool, yes: Unit -> A, no: Unit -> A) -> A:
45 match cc:
46 case True{}:
47 yes(Unit{})
48 case False{}:
49 no(Unit{})