SHUFFLE inputVector resultVariable

Replaces the contents of the result variable with the contents of the input vector but in random order. SHUFFLE is used together with TAKE to do sampling without replacement.

COPY 1,52 deck
SHUFFLE deck shuffledDeck
TAKE shuffledDeck 1,5   hand1
TAKE shuffledDeck 6,10  hand2
TAKE shuffledDeck 11,15 hand3
TAKE shuffledDeck 16,20 hand4
PRINT hand1 hand2 hand3 hand4 

The above program produced the following result:

hand1: (48.0 18.0 24.0 39.0 7.0)
hand2: (25.0 47.0 49.0 26.0 52.0)
hand3: (32.0 43.0 33.0 27.0 35.0)
hand4: (42.0 40.0 3.0 41.0 8.0)