code: function checkPromise(index) {
        var res = cb(callbacks[index]); // actually calling callback
        if (res instanceof Promise) {
          res.then(function (cbRes) {
            if (cbRes !== false) {
              // keep going
              if (index > 0) {
                checkPromise(index - 1);
              }
            }
          });
        } else {
          if (res !== false) {
            // keep going
            if (index > 0) {
              checkPromise(index - 1);
            }
          }
        }
      }
docs: process each promise in direct order if promise returns false, do not execute further promises