mod package:rel8

Emulates the behaviour of the Haskell function mod in PostgreSQL.
Corresponds to mode() WITHIN GROUP (ORDER BY _).
Applies mode to the column selected by the given function.
Any modifiers applied to the underlying type.
Simultaneous div and mod.