From: Julian Snitow Date: 2003-03-26T05:24:12+09:00 Subject: Re: Iterate over two lists in parallel Han Holl wrote: > > It may be more Rubyesque, but unfortunately it doesn't work: > > puts ex.get > puts "---" > puts ex.get > puts "***" > > produces: > foo > --- > bar > --- > baz > --- > qux > --- > florp > --- > bzaa > --- > worble > --- > nil > --- > foo > *** Presumably you'd test for nil, making this like a non-destructive version of the shift method. (I.e., the collection itself doesn't have to manage the state of the iteration.)