code: function fulfilled(value) {
              var p = new Promise();
              p.then = then;
              states.fulfill(p, value);
              return p;
  
              function then(onFulfilled) {
                  try {
                      return resolve(typeof onFulfilled == 'function' ? onFulfilled(value) : value);
                  } catch (e) {
                      return rejected(e);
                  }
              }
          }
docs: Create an already-resolved promise for the supplied value
  @private
  
  @param {*} value
  @return {Promise} fulfilled promise