"Squeak 6.1 cookbook: Shuffle a copy of an array
Select the executable expression below and choose Print it.
This is a seeded demonstration, not a secure draw. Preserve the same generator to continue a sequence; recreating it restarts the sequence."

| random shuffled |
random := Random seed: 42.
shuffled := #(1 2 3 4 5) copy.
shuffled size to: 2 by: -1 do: [:index |
    shuffled swap: index with: (random nextInt: index)].
shuffled
