chickadee » srfi-27 » random-permutation!

(make-random-permutations [#:randoms (make-uniform-random-integers)]) => (procedure (integer) vector)procedure
(random-permutation! VECTOR [#:randoms (make-uniform-random-integers)]) => 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).