Subject: Re: Java discovers map
From: (Rob Warnock)
Date: Wed, 08 Aug 2007 03:38:50 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
In article <>,
Matthew Swank  <> 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.


[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			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607