http://qs321.pair.com?node_id=458697


in reply to Re: Recursively-generated Iterators
in thread Recursively-generated Iterators

It should be applicable to any algorithm that generates a set where different portions of the set are generated by different recursive calls. That's mostly combinatorial things like this, but Towers of Hanoi would also be a good example. If each item in the returned set required some value from more than one recursive call, you couldn't do it this way.

Caution: Contents may have been coded under pressure.