def Clamp.value

bend-collections-laws-crypto@1.0.0.0 · spec/math/natural.bend:287

import bend-collections-laws-crypto@1.0.0.0/spec/math/natural.bend as Natural
import Base
import bend-collections-laws-crypto@1.0.0.0/src/math/natural.bend as M

287def Clamp.value(+x: Nat, +lo: Nat, +hi: Nat, +h: {Nat.is_le(lo, hi) == True{} : Bool}) -> Type:
288  {M.clamp(x, lo, hi) == Done{Nat.min(Nat.max(x, lo), hi)} : Result<&2, &2, M.MathError, Nat>}

Uses (8)

Used by (1)