page 1  (16 pages)
2to next section

In this paper we discuss two situations, in object oriented programming, where the semantics of coroutines is useful: in the implementations of loop iterators and of dynamic data structure navigators. In both of these operations the receiving object is a loop control object. Iterators are applied to produce, outside of the loop's environment, the next value for the loop control object; navigators are applied to indicate, outside of the loop environment, the next element in a dynamic data structure.