#--
# CREDIT Gavin Kistner
#++

module Enumerable

  # Uses #+ to sum the enumerated elements.
  #
  #   [1,2,3].sum  #=> 6
  #   [3,3,3].sum  #=> 9

  def sum
    v = 0
    each{ |n| v+=n }
    v
  end

end

