toy-lib-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Heuristic.Randoms

Synopsis

Documentation

rolls :: (RandomGen g, UniformRange a, Unbox a) => Int -> (a, a) -> g -> Vector a #

Generates n random values in rng.

>>> rolls 3 (0 :: Int , 100 :: Int) (mkStdGen 137)
[51,1,29]

rollsM :: (StatefulGen g m, UniformRange a, Unbox a) => Int -> (a, a) -> g -> m (Vector a) #

uniformRSt :: (RandomGen g, UniformRange a, MonadState g m) => (a, a) -> m a #

uniformR where the RandomGen is given via MonadState.