The default implementation for divMod decides whether to adjust the result of quotRem based on the results of negate and signum. Since Volume can't be negative this test doesn't work and you end up with incorrect results like 60 divMod 5 == (11, 5). The correct behavior is for divMod to behave the same as quotRem.
The default implementation for divMod decides whether to adjust the result of quotRem based on the results of negate and signum. Since Volume can't be negative this test doesn't work and you end up with incorrect results like 60
divMod
5 == (11, 5). The correct behavior is for divMod to behave the same as quotRem.