From: Simon Cozens Date: 2003-01-24T23:08:39+09:00 Subject: Re: Definition: iterator Paul Brannan writes: > > 1) we can call block several times > > 2) we can't return control from middle of block > > I don't understand what you mean. I believe that functions that take blocks > meat both these criteria. That would be true if you could essentially "yield" back to the calling routine, so this would say: > foo do > puts "this is a test" > next > puts "you should not see this message" > end 1 this is a test 2 you should not see this message. Co-routines can switch control both ways. -- Some people claim that the UNIX learning curve is steep, but at least you only have to climb it once.