Generator Arrow Functions

Kevin Smith zenparsing at gmail.com
Fri Nov 15 10:12:39 PST 2013


>
> Basically, as long as the outermost generator is
> run by an async runner, both lazy and async execution of all nested
> generators/iterators is possible.


Sure - it's the "async runner" part though (e.g. `spawn`), which is the use
case presented here.

    async function F(p1, p2, ...pN) { /*...*/ }

Would (very) approximately de-sugar to something like:

    function F(...args) {
        return spawn(this, args, function* (p1, p1, ...pN) { /* ... */ });
    }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131115/36f1ee1e/attachment.html>


More information about the es-discuss mailing list