----- Original Message ----- 
From: "Julian Snitow" <vangczung / yahoo.com>
Newsgroups: comp.lang.ruby
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
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