def FSign.select
bend-collections-laws-math@1.0.0.0 · spec/math/generic.bend:238
import bend-collections-laws-math@1.0.0.0/spec/math/generic.bend as Generic
import Base
import bend-collections-laws-math@1.0.0.0/src/math/num.bend as N
import bend-collections-laws-math@1.0.0.0/src/math/generic.bend as G
238
239def FSign.select(~T: Data, ~op: N.Op<T> -> T, ~test: N.Test<T> -> Bool, +x: T) -> Type:
240 {G.sign(~T, ~op, ~test, x) == pick(T, test(N.Lt{op(N.ZeroOp{}), x}), op(N.One{}), pick(T, test(N.Lt{x, op(N.ZeroOp{})}), op(N.Neg{op(N.One{})}), x)) : T}