9 lines
311 B
Text
9 lines
311 B
Text
set list to 1..9 -- a range, will become a list as needed
|
|
set last to the number of items in list
|
|
|
|
repeat with i = last down to 2 -- in SenseTalk, the first index in a list is 1
|
|
set j = random (1,i-1)
|
|
set [item i of list, item j of list] to [item j of list, item i of list] -- swap items
|
|
end repeat
|
|
|
|
put list
|