def shuffle( a ) = res = array( a ) n = a.length() for i <- 0:n r = rnd( i:n ) res(i), res(r) = res(r), res(i) res.toList()