array with elements to shuffle
random number generator whose generated numbers must have range ]-1..0] or [0..1[, will be invoked array.length - 1 times
shuffled array
int[] arr = [ 1, 2, 3, 4 ]; auto random_generator = () { return 0.42; }; // not proven by the dice roll shuffle(arr, random_generator());
Shuffles the elements of array in-place.