So let me ask you this:

going back to

sum = [1,3,5].inject(0) {|s,e| s+e}
puts sum

what if you want to return an array that shows each step of the way, 
such that:

sum => [1,4,9]

??
-- 
Posted via http://www.ruby-forum.com/.