Generic.divmod_ok: 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 602-607 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=602&end_line=607 import Base import bend-collections-laws-crypto@1.0.0.0/src/math/num.bend as N def divmod_ok(~T: Data, ~op: N.Op -> T, +a: T, +b: T, zero: Bool) -> Result<&2, &2, N.NumError, QuotRem>: match zero: case True{}: Fail{N.DivByZero{}} case False{}: Done{TQR{op(N.Quot{a, b}), op(N.Rem{a, b})}} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/generic.bend&name=QuotRem https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/num.bend&name=NumError https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/num.bend&name=Op