code: function settlePromise (p, state, value) {
          // 2.1.2
          // 2.1.3
          if (p._s !== $pending) return;
  
          // 2.1.1.1
          p._s = state;
          p._v = value;
  
          var i = 0,
              len = p._c;
  
          // 2.2.2
          // 2.2.3
          while (i < len) {
              // 2.2.4
              scheduleHandler(p, p[i++]);
          }
  
          return p;
      }
docs: Resolve or reject a promise.
  @param  {Yaku} p
  @param  {Integer} state
  @param  {Any} value