def Decimal.divk.m
import bend-kit-bignum@0.1.0.0/decimal.bend as Decimalimport Base
import bend-kit-bignum@0.1.0.0/bigint.bend as Big
68# (remainder is zero, quotient) of u / k, for a nonzero k.
69def Decimal.divk.m(m: Maybe<&1, Big.BigInt & Big.BigInt>) -> Bool & Big.BigInt:
70 match m:
71 case Some{(q, r)}:
72 (Big.BigInt.is_zero(r), q)
73 case None{}:
74 (False{}, Big.BigInt.zero())