ruby - How to convert n arrays of length m into m arrays of length n? -


I am trying to change it:

  [[1, 2, 3] , 4], [5, 6, 7, 8], [9, 10, 11, 12]]  

In:

  [[1 , 5, 9], [2, 6, 10], [3, 7, 11], [4, 8, 12]]  

Is there a function to do this? If it is not, then what is the low and cleaner way?

The underlying method you are looking for


Comments

Popular posts from this blog

google indexing -

wpf controls - Trigger on Image inside a Button WPF -

wpf - Converter stops filter working -