Safe Haskell | Safe |
---|---|
Language | Haskell98 |
- pick :: MonadRandom m => [a] -> m a
- picks :: MonadRandom m => [a] -> m [a]
- module System.Random.Shuffle
Documentation
pick :: MonadRandom m => [a] -> m a Source #
Picks a random element from the provided list
picks :: MonadRandom m => [a] -> m [a] Source #
Returns an infinite list of randomly-chosen elements from the provided list
e.g.
> > take 5 <$> picks [1,2,3,4] > [2,3,1,1,3]
module System.Random.Shuffle