#--
# Credit goes to Sean O'Halpin (ruby-talk:199877).
#++

module Enumerable

  # Cascade actions on each enumerated element.
  #
  # [9, 19, 29].cascade :succ, :to_s, :reverse
  # => ["01", "02", "03"]

  def cascade(*methods)
    methods.inject(self) { |ary, method| ary.map{ |x| x.send(method)}}
  end

end
