Generic.gcd_bin: 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 300-303 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=300&end_line=303 import Base import bend-collections-laws-crypto@1.0.0.0/src/math/num.bend as N # one Euclid step first (so a tiny b costs one division, not a bit per # subtraction), then the binary loop def gcd_bin(~T: Data, ~op: N.Op -> T, ~test: N.Test -> Bool, +a: T, +b: T) -> T: gcd_rb(~T, ~op, ~test, a, b, test(N.IsZero{b})) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/generic.bend&name=gcd_rb 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