Monadic functions for random number generation.
Because manually threading the correct
Seed value around is
tedious and error-prone, one common approach is to use some
kind of state monad to hide it. This module provides the
convenience functions to make this easy; just write a
RandomM instance for your particular monad, and then you
can easily and conveniently generate random numbers.
The class of monads holding a single random
Seed within their