def cnat

bend-collections-laws-math@1.0.0.0 · spec/math/fixed.bend:55

import bend-collections-laws-math@1.0.0.0/spec/math/fixed.bend as Fixed
import Base
import bend-collections-laws-math@1.0.0.0/spec/lib/common.bend as C

55# n when it fits w bits
56def cnat(+w: Nat, +n: Nat) -> Maybe<&2, Nat>:
57  keep(C.fits(w, n), n)

Uses (4)

Used by (3)