real-dice-0.1.0.3: Random number generation based on physical media touched by humans
Safe HaskellSafe-Inferred
LanguageGHC2021

RealDice.Manipulate.RandomizeList

Description

Module for randomizing the order of elements in a list. Used to generate randomized lists for table-based random generation

Synopsis

Documentation

randomizeList :: [Int] -> [Int] Source #

Randomizes the order of a list of integers using the default balanced table of RealDice randomized booleans

Examples

Expand
>>> randomizeList [1, 2, 3, 4, 5]
[5,3,1,2,4]

randomizeWithCustomBools :: [Int] -> [Bool] -> [Int] Source #

Randomizes the order of a list of integers using a custom list of booleans

Examples

Expand
>>> randomizeWithCustomBools [1, 2, 3, 4, 5] [True, False, False, True, True]
[5,4,1,2,3]