cardano-wallet-core-2022.7.1: The Wallet Backend for a Cardano node.
Safe Haskell None
Language Haskell2010

Data.Vector.Shuffle

Synopsis

Simple

shuffle :: [a] -> IO [a] Source #

Shuffles a list of elements.

>>> shuffle (outputs coinSel)
[...]

Advanced

mkSeed :: Text -> Int Source #

Generate a random generator seed from a text string

shuffleWith :: RandomGen g => g -> [a] -> IO [a] Source #

Like shuffle , but from a given seed. shuffle will use a randomly generate seed using newStdGen from System.Random .

Properties:

  • shuffleWith g es == shuffleWith g es
  • ∃Δ> 1. g ≠g', length es > Δ⇒ shuffleWith g es ≠shuffleWith g' es