Generic.mul_st: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/math/generic.bend as Generic Lines 142-148 of bend-collections@1.0.0.0/src/math/generic.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/math/generic.bend&start_line=142&end_line=148 import Base import bend-collections@1.0.0.0/src/math/num.bend as N # (value, still fits) after multiplying by x when bit is set def mul_st(~T: Data, ~op: N.Op -> T, ~test: N.Test -> Bool, bit: Bool, +x: T, +xok: Bool, st: T & Bool) -> T & Bool: match bit st: case False{} _: st case True{} Tuple{+a, +aok}: (op(N.Mul{a, x}), Bool.and(Bool.and(aok, xok), Bool.not(test(N.MulOver{a, x})))) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/num.bend&name=Op https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/num.bend&name=Test