From: Ryan Leavengood Date: 2005-10-20T04:08:01+09:00 Subject: Re: Functional with Ruby On 10/19/05, Ryan Leavengood wrote: > > irb(main):002:0> a.inject(0){|i,sum| i+sum} One small thing, I had the order wrong on the parameters (i.e. the names are misleading.) It should be: a.inject(0){|sum,i| sum+i} It still works either way in this case. But other kinds of injects may not be commutative, so I just wanted to make sure I didn't mess up any newbies :) ri is your friend. Ryan