From: Robert Klemme Date: 2005-06-02T19:50:23+09:00 Subject: Re: internal iterators in ruby Geert Fannes wrote: > Hello, the following code can iterate over any number of arrays and > has both the each and collect method implemented. You find some > example usage at the end of the code. > Greetings, > Geert Fannes. You code works only for arrays, but it's quite efficient. This works for all Enumerable types, is less efficient - and it's part of the std lib: http://www.ruby-doc.org/stdlib/libdoc/generator/rdoc/classes/SyncEnumerator.html Know your standard libs... :-) Kind regards robert