In the latest ECMA262 6th draft (rev15), YieldExpression with delegate detailed algorithm is defined. Reading the spec algortithm, I think this is very useful to put together iterators to make a complex iterator. edit: I've reported issues in the spec about this section. https://bugs.ecmascript.org/show_bug.cgi?id=1486 https://bugs.ecmascript.org/show_bug.cgi?id=1487 For example, function* gen() {
![YieldExpression with delegate - 枕を欹てて聴く](https://cdn-ak-scissors.b.st-hatena.com/image/square/06a15c64ba0ceec233d86d71001ebb29a9dcbf5d/height=288;version=1;width=512/https%3A%2F%2Fcdn.blog.st-hatena.com%2Fimages%2Ftheme%2Fog-image-1500.png)