code: function(callback, resolver, disposition) {
    if (!isCallback(callback)) {
      // If we don't get a callback, we want to forward whatever resolution we get
      return resolver[disposition].bind(resolver);
    }
  
    return function() {
      try {
        var r = callback.apply(null, arguments);
        resolver.resolve(r);
      } catch(e) {
        // Exceptions reject the resolver
        resolver.reject(e);
      }
    };
  }
docs: Used in .then()