I wrote that once in
Re: Re: (Perl6) Groking Continuations (iterators) as a general response to converting a recursive function to an iterator. When it is published, see also
Dominus'
Perl Advanced Techniques Handbook which goes into this subject in depth.