def mul_by

bend-collections@1.0.0.0 · src/math/generic.bend:438

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

438# (acc * x, still fits)
439def mul_by(~T: Data, ~op: N.Op<T> -> T, ~test: N.Test<T> -> Bool, +x: T, st: T & Bool) -> T & Bool:
440  match st:
441    case Tuple{+a, +aok}:
442      (op(N.Mul{a, x}), Bool.and(aok, Bool.not(test(N.MulOver{a, x}))))

Uses (7)

Used by (3)