Processing multiple arrays simultaneously in ruby

Posted by Shreyas Satish on Stack Overflow See other posts from Stack Overflow or by Shreyas Satish
Published on 2010-04-22T10:17:18Z Indexed on 2010/04/22 11:13 UTC
Read the original article Hit count: 183

I have an array : a=[[1,2],[3]] and b=[[2,3],[5]] i need to add corresponding elements in each array simultaneously in order to obtain the result;

result=[[3,5],[8]].

Thanks and Cheers!

© Stack Overflow or respective owner

Related posts about ruby

Related posts about multidimensional-array