Gopher
FUNCTIONS

shuffle

Returns a random permutation of a given array or slice.

Syntax

shuffle COLLECTION
shuffle-input.html

<!-- Shuffled sequence = -->
<div>{{ shuffle (seq 1 5) }}</div>
<!-- Shuffled slice =  -->
<div>{{ shuffle (slice "foo" "bar" "buzz") }}</div>

This example would return the following:

shuffle-output.html

<!-- Shuffled sequence =  -->
<div>2 5 3 1 4</div>
<!-- Shuffled slice =  -->
<div>buzz foo bar</div>

This example also makes use of the slice and seq functions.