On Jul 17, 10:13=A0pm, John Feminella <jo... / bitsbuilder.com> wrote:
> Doesn't zip basically do that already?
>
> ruby-1.9.2-p180 :001 > l =3D [1,2,3]; r =3D [6,5,4]
> =A0=3D> [6, 5, 4]
> ruby-1.9.2-p180 :002 > arr =3D []; l.zip(r) { |first, second| arr << 3 *
> first + second }; arr
> =A0=3D> [9, 11, 13]
>
> (Are you just trying to save the last step?)

Actually, I didn't know zip took a block. Good to know. So yea, that
makes it much closer than I realized. But why doesn't it map the
results? That's unfortunate. I think I will submit a feature request
for Ruby.

Thanks.