def bit_value

bend-collections-laws-math@1.0.0.0 · spec/lib/numeric.bend:8

import bend-collections-laws-math@1.0.0.0/spec/lib/numeric.bend as Numeric
import Base

8# Independent mathematical interpretation. Nat here is a specification value;
9# no public executable conversion of a 64-bit number through Nat is required.
10def bit_value(b: Bool) -> Nat:
11  match b:
12    case False{}:
13      0n
14    case True{}:
15      1n

Uses (2)

Used by (2)