lib/promise.js
function (defs, normalizeResults) {
            this.__errors = [];
            this.__results = [];
            this.normalizeResults = base.isBoolean(normalizeResults) ? normalizeResults : false;
            this._super(arguments);
            if (defs && defs.length) {
                this.__defLength = defs.length;
                forEach(defs, this.__addPromise, this);
            } else {
                this.__resolve();
            }
        }
function (defs, normalizeResults) {
            this.__errors = [];
            this.__results = [];
            this.normalizeResults = base.isBoolean(normalizeResults) ? normalizeResults : false;
            this._super(arguments);
            if (defs && defs.length) {
                this.__defLength = defs.length;
                forEach(defs, this.__addPromise, this);
            } else {
                this.__resolve();
            }
        }
function ( defs , normalizeResults ) { this . __errors = [ ] ; this . __results = [ ] ; this . normalizeResults = base . isBoolean ( normalizeResults ) ? normalizeResults : false ; this . _super ( arguments ) ; if ( defs && defs . length ) { this . __defLength = defs . length ; forEach ( defs , this . __addPromise , this ) ; } else { this . __resolve ( ) ; } }
PromiseList object used for handling a list of Promises

@example
var myFunc = function(){
var promise = new Promise();
//callback the promise after 10 Secs
setTimeout(hitch(promise, "callback"), 10000);
return promise.promise();
}
var myFunc2 = function(){
var promises =[];
for(var i = 0; i < 10; i++){
promises.push(myFunc);
}
//create a new promise list with all 10 promises
return new PromiseList(promises).promise();
}

myFunc.then(function(success){}, function(error){})
//chain promise operations
myFunc.chain(myfunc).then(function(success){}, function(error){})

myFunc2.then(function(success){}, function(error){})
//chain promise operations
myFunc2.chain(myfunc).then(function(success){}, function(error){})

@param {comb.Promise[]} [defs=[]] the list of promises
@constructs
@augments comb.Promise
@memberOf comb
PromiseList object used for handling a list of Promises