From: Robert Klemme Date: 2004-08-03T17:31:36+09:00 Subject: Re: Request for two methods in Array class "Ara.T.Howard" schrieb im Newsbeitrag news:Pine.LNX.4.60.0408021412540.11770@harp.ngdc.noaa.gov... > On Tue, 3 Aug 2004, Michael Neumann wrote: > > > It's the same length: > > a.zip(b).map {|x,y| x*y} > > # vs. > > a.combine(b) {|x,y| x*y} > > but one less object creation You can save that by using inject: a = [1,2,3] b = [1,3,5] a.inject([]){|arr,x| arr << (x*b[arr.size])} Regards robert