divMod package:ghc-internal

simultaneous div and mod. WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.
Used to implement divMod for the Integral typeclass. This gives a tuple equivalent to
(div x y, mod x y)

Example

>>> divModInt 10 2
(5,0)
>>> divMod 10 2
(5,0)
Used to implement divMod for the Integral typeclass. This gives a tuple equivalent to
(div x y, mod x y)

Example

>>> divModInteger 10 2
(5,0)
>>> divMod 10 2
(5,0)