From: Pit Capitain Date: 2003-03-17T07:48:55+09:00 Subject: Re: Iterator using Continuations On 17 Mar 2003 at 3:29, Hans J�rg Hessmann wrote: > Im am preparing a small presentation for ruby. Therefore I was searching for a > continuation example. I tried to make a Java like iterator for any ruby class > with an each() method. This is the solution I found: > > class Iterator > (...) > > What do you think of this approach? Is there an easier way to do it? You should be able to find some approaches in the ruby-talk archives. There's also Knu's implementation in CVS (look in "rough"). If you have problems finding them I can look for more details. Regards, Pit