def bit
import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arithimport Base
15def bit(b: Bool, x: Nat) -> Nat:
16 match b:
17 case False{}:
18 Nat.double(x)
19 case True{}:
20 1n+Nat.double(x)
import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arithimport Base
15def bit(b: Bool, x: Nat) -> Nat:
16 match b:
17 case False{}:
18 Nat.double(x)
19 case True{}:
20 1n+Nat.double(x)