docs: function rejected(reason) {
              var p = new Promise();
              p.then = then;
              states.reject(p, reason);
              return p;
  
              function then(_, onRejected) {
                  try {
                      return resolve(typeof onRejected == 'function' ? onRejected(reason) : rejected(reason));
                  } catch (e) {
                      return rejected(e);
                  }
              }
          }