1

I've been tinkering with the new harmony generators on latest Node.js and libraries that use them for flow-control like co, gen-run or gene

The use of yield is quite clear but I've noticed the yield* syntax with nested generator functions in the later two libraries but not in the first. I can't find any reference about it. ¿What are the differences and use cases?

  • See [Delegating Yield](http://wiki.ecmascript.org/doku.php?id=harmony:generators#delegating_yield) in the Harmony wiki. That should explain it. – James Allardice Sep 03 '13 at 07:17
  • Good, so if I understood correctly in the case of [co](https://github.com/visionmedia/co/blob/master/index.js) there is no need of use the yield* because of the `toThunk` function will call recursively `co` when you yield another generator function, right? – Vicente Gallur Valero Sep 03 '13 at 09:06

0 Answers0