From: Daniel Lucraft Date: 2007-07-20T01:17:11+09:00 Subject: Re: Map more than one array at once Wil wrote: > Hi all, > > Better, but a map/inject solution would be desired. Does anyone else > know of a way to iterate through two arrays without the use of an > index? def dot_prod(a, b) acc = 0 a.zip(b) do |a1, b1| acc += a1*b1 end acc end best, Dan -- Posted via http://www.ruby-forum.com/.