def checked
import bend-collections-laws-math@1.0.0.0/spec/math/generic.bend as Genericimport Base
import bend-collections-laws-math@1.0.0.0/src/math/num.bend as N
70# n as a T, or Overflow when it needs more than w bits
71def checked(~T: Data, ~of: Nat -> T, +w: Nat, +n: Nat) -> Result<&2, &2, N.NumError, T>:
72 checked_pick(~T, ~of, n, fits(w, n))
Uses (5)
Used by (32)
- bend-collections-laws-math@1.0.0.0/spec/math/generic:Factorial.checked
- bend-collections-laws-math@1.0.0.0/spec/math/generic:Pow.checked
- bend-collections-laws-math@1.0.0.0/spec/math/generic:Comb.checked
- bend-collections-laws-math@1.0.0.0/spec/math/generic:Lcm.checked
- bend-collections-laws-math@1.0.0.0/spec/math/generic:Perm.checked
- …