def when
import gralha-http-core@0.1.0.0/http.bend as Httpimport Base
9# One of two computations, run on c; only the chosen one runs.
10def when(-A: Type, c: Bool, yes: Unit -> A, no: Unit -> A) -> A:
11 match c:
12 case True{}:
13 yes(Unit{})
14 case False{}:
15 no(Unit{})