title: ES6/ES2015 yield within closure in a function*
body: <p>Can you yield from within a closure?</p>
  
  <pre><code>// I want the following to work but instead I get:
  //   Uncaught SyntaxError: missing ) after argument list(…)
  
  function* test() {
      yield 1;
      [2,3].map(x =&gt; yield x);
      yield 4;
  }
  
  var gen = test();
  console.log(gen.next().value); // 1
  console.log(gen.next().value); // 2
  console.log(gen.next().value); // 3
  console.log(gen.next().value); // 4
  </code></pre>