def bit

bendtorch-core@0.1.0.0 · src/storage/arith.bend:15

import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith
import 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)

Uses (3)

Used by (4)