code: function runUntilResolved(genInstance, nextArg) {
    try {
      let nextResult = genInstance.next(nextArg);
      if (nextResult.done) {
        return Promise.resolve(nextResult.value);
      } else {
        let v = nextResult.value;
        let fn = v.fn;
        let thisArg;
        if (fn instanceof Array) {
          thisArg = fn[0];
          fn = fn[1];
        }
        let args = v.args;
  
        if (fn == null || args == null) {
          throw new Error('`Episode7.run` requires using `Episode7.call` with every `yield`. '+
            'Check all of the `yield` expressions in [Function: '+genInstance.episode7Name+']');
        }
  
        // Iterate through the generator, handling
        // promises & nested generators.
        // Side-effect function is called without `this`.
        let sideEffect;
        if (isGeneratorFunction(fn)) {
          sideEffect = Promise.resolve()
            .then(function() {
              // Wrapped in `then` to promisify return value
              return run(fn, ...args)
            })
        } else {
          sideEffect = Promise.resolve()
            .then(function() {
              // Wrapped in `then` to promisify return value
              return fn.call(thisArg, ...args)
            })
        }
        return sideEffect
          .then(function(result) {
            return runUntilResolved(genInstance, result);
          })
      }
  
    } catch(error) {
      return Promise.reject(error);
    }
  }
docs: /*
  Internal function to run the generator, waiting on
  each side-effect's returned Promise.
  
  Each side-effect function is executed via standard
  JavaScript `Function.prototype.call`.
  
  Returns a Promise of the return value from
  the generator.