collections.Shuffle
Returns a random permutation of a given array or slice.
Syntax
collections.Shuffle COLLECTION
Returns
any
Alias
shuffle
{{ shuffle (seq 1 2 3) }} → [3 1 2]
{{ shuffle (slice "a" "b" "c") }} → [b a c]
The result will vary from one build to the next.
Last updated:
January 26, 2024
:
Squashed 'docs/' changes from 4dd2d6415..3b1a8579d (7125ad401)
Improve this page