From: "Hal E. Fulton" Date: 2003-03-25T15:56:41+09:00 Subject: Re: Iterate over two lists in parallel ----- Original Message ----- From: "Julian Snitow" Newsgroups: comp.lang.ruby To: "ruby-talk ML" Sent: Tuesday, March 25, 2003 12:42 AM Subject: Re: Iterate over two lists in parallel > Also, it just occured to me that it might be more Rubylike to have a > mixin method like > > module Iteration > class ExternalIterator > # class definition same as above > end > > def iter > ExternalIterator.new(self) > end > end > > Then you'd just do something like > > class Array > include Iteration > end > > ex = ["foo", "bar", "baz", "qux", "florp", "bzaa", "worble"].iter > > # then call ex.get whenever you want the next value > ################################### My thoughts exactly. :) See my post from ten minutes ago. Hal