Re: Zip more than two arrays?

2005-10-25 Thread Larry Wall
On Fri, Oct 21, 2005 at 04:04:25PM -0600, Luke Palmer wrote: : However, if I get my wish of having zip return tuples, then it can be : left-associative. But since it interleaves instead, making it left- : or right-associative gives strange, incorrect results. I expect zip ought to bundle up into

Zip more than two arrays?

2005-10-21 Thread Mark Reed
Hm. This brings up another point, which may have been addressed . . . The Python function and Ruby array method zip() both accept any number of arrays to interleave: zip([1,2,3],[4,5,6],[7,8,9]) [(1, 4, 7), (2, 5, 8), (3, 6, 9)] irb(main):001:0 [1,2,3].zip([4,5,6],[7,8,9]) = [[1, 4, 7], [2,

Re: Zip more than two arrays?

2005-10-21 Thread Luke Palmer
On 10/21/05, Mark Reed [EMAIL PROTECTED] wrote: Hm. This brings up another point, which may have been addressed . . . The Python function and Ruby array method zip() both accept any number of arrays to interleave: zip([1,2,3],[4,5,6],[7,8,9]) [(1, 4, 7), (2, 5, 8), (3, 6, 9)]