code: function promiseWhen(promise, fulfilled, rejected) {
          // simply call rejected
          if (promise instanceof Reject) {
              // if there is a rejected , should always has! see when()
              rejected.call(promise, promise[PROMISE_VALUE]);
          } else {
              var v = promise[PROMISE_VALUE], pendings = promise[PROMISE_PENDINGS];
              if (pendings === undefined) {
                  pendings = promise[PROMISE_PENDINGS] = [];
              }    // unresolved
                   // pushed to pending list
              // unresolved
              // pushed to pending list
              if (pendings) {
                  pendings.push([
                      fulfilled,
                      rejected
                  ]);
              } else if (isPromise(v)) {
                  // rejected or nested promise
                  promiseWhen(v, fulfilled, rejected);
              } else {
                  // fulfilled value
                  // normal value represents ok
                  // need return user's return value
                  // if return promise then forward
                  if (fulfilled) {
                      fulfilled.call(promise, v);
                  }
              }
          }
      }
docs: /*
  two effects:
  1. call fulfilled with immediate value
  2. push fulfilled in right promise
   /*
  two effects:
  1. call fulfilled with immediate value
  2. push fulfilled in right promise