1### Julia ###
2
3using Random: shuffle, shuffle!
4
5v = [1, 2, 3, 4, 5, 6]
6
7println(v)
8# [1, 2, 3, 4, 5, 6]
9
10# Create a shuffled vector from `v`, leaving `v` as is.
11shuffled_v = shuffle(v)
12println(shuffled_v)
13# [6, 4, 1, 2, 3, 5]
14println(v)
15# [1, 2, 3, 4, 5, 6]
16
17# Shuffle `v` in place
18shuffle!(v)
19println(v)
20# [3, 4, 2, 6, 5, 1]