Allen Wirfs-Brock (2013-09-06T18:01:46.000Z)
On Sep 6, 2013, at 10:22 AM, Brendan Eich wrote:

>> ...
> 
> Good point, although the example in question did not use |this|, and I would have adapted if it had:
> 
> (function*() { for (let x of [1,2, 3]) yield this[x]; }).call(this)
> 
> Too bad that we don't have generator arrow function syntax :-P.

Almost as good, a arrow function with a generator comprehension as its expression body.  For example, a factory for a generator with a lexical this binding:

          c => (for (p of c) if (p in this) this[p])

not much different from a hypothetical generator arrow function and arguably better :
          c *=> {for  (p of c) if (p in this) yield this[p]}

allen
domenic at domenicdenicola.com (2013-09-18T18:52:04.660Z)
On Sep 6, 2013, at 10:22 AM, Brendan Eich wrote:

> Too bad that we don't have generator arrow function syntax :-P.

Almost as good, a arrow function with a generator comprehension as its expression body.  For example, a factory for a generator with a lexical this binding:

```js
c => (for (p of c) if (p in this) this[p])
```

not much different from a hypothetical generator arrow function and arguably better :

```js
c *=> {for  (p of c) if (p in this) yield this[p]}
```