shuffle
Shuffles a container.
Syntax
-
shuffle(X)
-
X
is any ordered container
-
Description
If X
is any ordered container, then shuffle(X)
returns the object obtained from X
by shuffling the elements in it.
X
can be a string, a vector, a matrix, a list, a pixmap, or a binary data object.
Examples
shuffle("I am Lord Voldemort.")
.o dat dVrreIm Lomlo
shuffle(SequenceVector(10))
(6, 4, 7, 2, 10, 9, 3, 5, 8, 1)
shuffle(IdentityMatrix(5))
⎛0 0 1 0 0⎞ ⎜0 0 0 1 1⎟ ⎜1 0 0 0 0⎟ ⎜0 0 0 0 0⎟ ⎝0 0 0 1 0⎠
shuffle('("cat", "dog", "rat", "guinea pig", "rabbit"))
rat guinea pig dog rabbit cat
bm ≔ ComputePixmap(200, 200, x, y, rgb(x/199, y/199, 0.5))
shuffle(bm)