>>>>> "P" == Paul Brannan <pbrannan / atdesk.com> writes:

>> What about a Python-like method "zip" (could be written using iterator.rb):
>> 
>> zip( [1,2,3], [4,5,6], [7,8,9] ) do |group|
>> p group
>> end
>> 
>> # => [1,4,7] [2,5,8] [3,6,9]

P> What about:

P>   irb(main):001:0> group = [1,2,3], [4,5,6], [7,8,9]
P>   [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
P>   irb(main):002:0> p *group
P>   [1, 2, 3]
P>   [4, 5, 6]
P>   [7, 8, 9]
P>   nil

 Perhaps I've not understood but it don't do the same thing that the
 proposed zip 

 For the proposition #zip see the thread "parallel array traversal"

 http://www.ruby-talk.com/6956

 and especially

 http://www.ruby-talk.com/7008


Guy Decoux