Library / System / Randomness / Shuffleable
INTERFACE
Shuffleable
The interface a shuffleable collection implements. shuffle(rng) reorders the collection in place into a uniformly-random permutation, drawing index choices from the supplied Shuffler. Array[T] implements it (Fisher-Yates); any future ordered collection can too.
Methods 1
MODIFY METHOD shuffle(MUTABLE REFERENCE Shuffler rng) RETURNS voidmodifies
Reorder in place into a uniformly-random permutation, drawing from
rng. MODIFY — mutates the collection; rng is a MUTABLE REFERENCE
because every draw advances its state.