julia shuffle vector
### Julia ###
using Random: shuffle, shuffle!
v = [1, 2, 3, 4, 5, 6]
println(v)
# [1, 2, 3, 4, 5, 6]
# Create a shuffled vector from `v`, leaving `v` as is.
shuffled_v = shuffle(v)
println(shuffled_v)
# [6, 4, 1, 2, 3, 5]
println(v)
# [1, 2, 3, 4, 5, 6]
# Shuffle `v` in place
shuffle!(v)
println(v)
# [3, 4, 2, 6, 5, 1]