proc shuffle &a[] . for i = len a[] downto 2 r = random 1 i swap a[r] a[i] . . arr[] = [ 1 2 3 4 ] shuffle arr[] print arr[]