12345678910111213141516 | extern random():Int
def shuffle(list:[Value])
for i in 1..(#list-1)
r := i + (random() mod (#list - i))
tmp := list[i]
list[i] = list[r]
list[r] = tmp
strings := ["one","two","three","four"]
shuffle strings
say "$strings"
ints := [1,2,3,4,5,6,7]
shuffle ints
say "$ints"
|