docs: function (array, startingValue) {
              array = array.slice(); // make a copy
              var self = this,
                  deferred = new Deferred(),
                  next = function (value) {
                      var nextAction = array.shift();
                      if (nextAction) {
                          self.when(nextAction(value), next, deferred.reject);
                      } else {
                          deferred.emitSuccess(value);
                      }
                  };
              next(startingValue);
              return deferred.getPromise();
          }