lib/cedar/prng.rb
# Return a randomly-ordered copy of the given array
Return a randomly-ordered copy of the given array
Return a randomly - ordered copy of the given array
def shuffle(s, arr)
      arr = arr.clone
      res = []
      n = arr.count
      n.times do
        i, s = int(s, 0, arr.count - 1)
        res << arr.delete_at(i)
      end
      [res, s]
    end
def shuffle ( s , arr ) arr = arr . clone res = [ ] n = arr . count n . times do i , s = int ( s , 0 , arr . count - 1 ) res << arr . delete_at ( i ) end [ res , s ] end
Return a randomly-ordered copy of the given array
Return a randomly - ordered copy of the given array
s
arr