Generic.mul_by: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/src/math/generic.bend as Generic Lines 438-442 of bend-collections-laws-crypto@1.0.0.0/src/math/generic.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/generic.bend&start_line=438&end_line=442 import Base import bend-collections-laws-crypto@1.0.0.0/src/math/num.bend as N # (acc * x, still fits) def mul_by(~T: Data, ~op: N.Op -> T, ~test: N.Test -> Bool, +x: T, st: T & Bool) -> T & Bool: match st: case Tuple{+a, +aok}: (op(N.Mul{a, x}), Bool.and(aok, 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-laws-crypto@1.0.0.0/src/math/num.bend&name=Op https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/num.bend&name=Test