chickadee » srfi-27 » make-random-permutations

(make-random-permutations [randoms: (RANDOMS current-random-integer)]) -> (integer -> vector)procedure
(random-permutation! VECTOR [randoms: (RANDOMS current-random-integer)]) -> vectorprocedure

Performs the "Knuth shuffle" (or "Fisher-Yates shuffle").

Fills VECTOR with a random permutation of the finite set {0 ... N-1}, where N = (vector-length VECTOR).

RANDOMS is a procedure: (exact-real) -> exact-real

(From Gambit)