def FClamp.select

bend-collections-laws-crypto@1.0.0.0 · spec/math/generic.bend:231

import bend-collections-laws-crypto@1.0.0.0/spec/math/generic.bend as Generic
import Base
import bend-collections-laws-crypto@1.0.0.0/src/math/num.bend as N
import bend-collections-laws-crypto@1.0.0.0/src/math/generic.bend as G

231# Domain when hi < lo; else min(max(x, lo), hi) by the two selections
232def FClamp.select(~T: Data, ~op: N.Op<T> -> T, ~test: N.Test<T> -> Bool, +x: T, +lo: T, +hi: T) -> Type:
233  {G.clamp(~T, ~op, ~test, x, lo, hi) == fclamp_pick(~T, ~test, x, lo, hi, test(N.Lt{hi, lo})) : Result<&2, &2, N.NumError, T>}

Uses (7)

Used by (0)

No other definition uses this definition.