Background:

http://esdiscuss.org/topic/next-yo-in-newborn-generators
http://esdiscuss.org/topic/april-8-2014-meeting-notes

It appears that the current state of affairs is that the argument supplied
to the first call of `next` on a newborn generator is "ignored and
inaccessibe".

Clearly, this means that there are some iterators which cannot be expressed
as a generator (namely, any iterator that echoes back it's `next`
arguments).  It seems like there should be parity here.

More concretely, the fact that information can be passed into generators
means that they can be used to create data sinks.  Since that first input
is inaccessible, however, this use case is made more awkward than it needs
to be; the consumer has to artificially "pump" the generator to get past
that first (useless) `next`.

Is there any way that the generator function can have access to that lost
data?

Thanks!
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to