Safe Haskell | None |
---|

`getStdRandom`

based `sclang`

random number functions.

- randomM :: (Random a, MonadIO m) => (a, a) -> m a
- rand :: (MonadIO m, Random n, Num n) => n -> m n
- rand2 :: (MonadIO m, Random n, Num n) => n -> m n
- randomG :: MonadIO m => (StdGen -> (a, StdGen)) -> m a
- nrand2 :: (Random a, Num a) => Int -> a -> IO [a]
- rrand :: (MonadIO m, Random n) => n -> n -> m n
- nrrand :: (MonadIO m, Random a, Num a) => Int -> a -> a -> m [a]
- choose :: MonadIO m => [a] -> m a
- exprand :: (MonadIO m, Floating n, Random n) => n -> n -> m n
- coin :: (MonadIO m, Random n, Fractional n, Ord n) => n -> m Bool
- scramble :: MonadIO m => [t] -> m [t]
- wchoose :: (MonadIO m, Random a, Ord a, Fractional a) => [b] -> [a] -> m b

# Documentation

nrrand :: (MonadIO m, Random a, Num a) => Int -> a -> a -> m [a]Source

Variant of `rrand`

generating *k* values.

exprand :: (MonadIO m, Floating n, Random n) => n -> n -> m nSource

`SimpleNumber.exprand`

generates exponentially distributed random
number in the given interval.