From: Bulat Ziganshin Date: 2003-01-24T20:32:57+09:00 Subject: Re: Definition: iterator Hello Paul, Thursday, January 23, 2003, 2:27:04 AM, you wrote: >> Would it be correct to say that an iterator is a method that lets you >> access items one at a time? (this includes both class and instance >> methods). PB> That would be true for normal Ruby iterators, but not all iterators. PB> C++ iterators, for example, are objects rather than methods. The object PB> can be used to iterate by writing "++it" to go to the next element or PB> "*it" to retrieve the current element. There are a number of libraries PB> available for iterating similarly in Ruby. technically speaking, iterator is a way to access elements of collection without knowing details of its implementation -- Best regards, Bulat mailto:bulatz@integ.ru