is an iterator allowed to reuse the same "state" object?
Tab Atkins Jr.
jackalmage at gmail.com
Mon Apr 27 22:29:55 UTC 2015
On Mon, Apr 27, 2015 at 3:11 PM, John Lenz <concavelenz at gmail.com> wrote:
> By which I mean the object that returns the current value and "done" state?
IIRC, it's not supposed to. The built-in iterators will return fresh
objects each time, so there's no mutation hazard. Userland iterators
can of course violate this, but at their peril.
~TJ
More information about the es-discuss
mailing list