Rand Monad and Random Class #
This module provides tools for formulating computations guided by randomness and for defining objects that can be created randomly.
Main definitions #
RandGmonad for computations guided by randomness;
Randomclass for objects that can be generated randomly;
randomto generate one object;
BoundedRandomclass for objects that can be generated randomly inside a range;
randomRto generate one object inside a range;
IO.runRandto run a randomized computation inside the
- Similar library in Haskell: https://hackage.haskell.org/package/MonadRandom
Rand α using the global
stdGenRef as RNG.
stdGenRefis not necessarily properly seeded on program startup as of now and will therefore be deterministic.
stdGenRefis not thread local, hence two threads accessing it at the same time will get the exact same generator.