On May 21, 2006, at 1:17 AM, Jeff Pritchard wrote:

> BTW, I think "combine" makes the most sense to me for a synonym of
> "inject".  The block describes how to combine all of the elements  
> into a
> single answer.  vis:
>
> total_cost = [[pie,2.00],[coffee,1.00]].combine { |cost, [food,  
> price]|
> cost += price }
>
>
> jp
>
> -- 
> Posted via http://www.ruby-forum.com/.
>

well here's another suggestion for an alternate name:

each_with_state

We already have each_with_index. Of course this implies an alternate  
ordering of the arguments.