Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- rolls :: (RandomGen g, UniformRange a, Unbox a) => Int -> (a, a) -> g -> Vector a
- 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
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
.