class Array
	def sum
		x = nil
		0.upto(self.length-1) do |e|
		#	if ((self[e].class==Fixnum) || (self[e].class==Float))
			if (self[e].kind_of?(Numeric) || self[e].kind_of?(Length))
				x ? (x += self[e]) : (x = self[e])
#				x = self[e] unless x
#				x += self[e] if x
#				puts x
			end
		end
		return x
	end
end