title: Run Promise.coroutine in loop
body: <p>I want to run Promise.coroutine(function*() function for as many times as </p>
  
  <p>mmjObject contains.In this case 3.</p>
  
  <pre><code>[{ mmjAcceessToken: "x"}, { mmjAcceessToken: "y"},{ mmjAcceessToken: "z"}]
  </code></pre>
  
  <p>How can I do this instead of calling  addCategories function 3 times.</p>
  
  <pre><code>function addCategories(req, res) {
      var mmjObject = [
          {
              mmjAcceessToken: "x"
          },
           {
               mmjAcceessToken: "z"
           },
           {
               mmjAcceessToken: "y"
           }
      ];
      Promise.coroutine(function*() {
          var u                 = yield a(k);
          var v                 = yield b(u);
          var y                 = yield c(v); 
          var z                 = yield d(y);
          return z;
      })().then((z) =&gt; {
          return res.send({
              "status": 200,
              "result": z
          });
      }, (err) =&gt; {
          return res.send({
              "status": 201,
              "error": err
          });
      })
  }
  </code></pre>