hgeometry-combinatorial-0.12.0.2: Data structures, and Data types.
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageHaskell2010

System.Random.Shuffle

Description

Implements Fishyer-Yates shuffle.

Synopsis

Documentation

shuffle :: (Foldable f, MonadRandom m) => f a -> m (Vector a) Source #

Fisher–Yates shuffle, which shuffles a list/foldable uniformly at random.

running time: \(O(n)\).