In article <pan.2007.08.08.02.24.48.316429@c.net>,
Matthew Swank <akopa_is_very_much_like_my_email@c.net> wrote:
+---------------
| Rob Warnock wrote:
| > - A reset function that restores the state of the object *AND ALL
| > OF ITS ITERATOR CHILDREN* to the state which existed immediately
| > after the execution of the "initial setup" function.
|
| This sounds like reset takes a saved continuation.
+---------------
*Almost*, except that in most non-lazy[1] languages [e.g., Scheme]
saved continuations *don't* restore the slots of mutable objects
or values of lexical variables bound before the continuation was
captured, only the flow of control. But you're correct in the very
loose sense that an iterator reset function should act somewhat
analogous to a saved continuation, except with respect to the
iterator object's state rather than the flow of control.
-Rob
[1] This is just a CYA caveat, since I don't know enough about
lazy languages in general to say what continuations do there.
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607