class Array
# Assumes we have defined randomize
  def random_each
    temp = self.randomize
    temp.each {|x| yield x}
  end
end

dwarves = %w(Sleepy Dopey Happy Sneezy Grumpy Bashful Doc)
list = ""
dwarves.random_each {|x| list += "#{x} "}
# list is now:
# "Bashful Dopey Sleepy Happy Grumpy Doc Sneezy "
# (Your mileage may vary.)

