lib/promise.js
function serial(list, callback, errback) {
    if (base.isArray(list)) {
        return callNext(list, [], false);
    } else {
        throw new Error("When calling comb.serial the first argument must be an array");
    }
}
function serial(list, callback, errback) {
    if (base.isArray(list)) {
        return callNext(list, [], false);
    } else {
        throw new Error("When calling comb.serial the first argument must be an array");
    }
}
function serial ( list , callback , errback ) { if ( base . isArray ( list ) ) { return callNext ( list , [ ] , false ) ; } else { throw new Error ( "When calling comb.serial the first argument must be an array" ) ; } }
Executes a list of items in a serial manner. If the list contains promises then each promise
will be executed in a serial manner, if the list contains non async items then the next item in the list
is called.

@example

var asyncAction = function(item, timeout){
var ret = new comb.Promise();
setTimeout(comb.hitchIgnore(ret, "callback", item), timeout);
return ret.promise();
};

comb.serial([
comb.partial(asyncAction, 1, 1000),
comb.partial(asyncAction, 2, 900),
comb.partial(asyncAction, 3, 800),
comb.partial(asyncAction, 4, 700),
comb.partial(asyncAction, 5, 600),
comb.partial(asyncAction, 6, 500)
]).then(function(results){
console.log(results); // [1,2,3,4,5,6];
});



@param list
@param callback
@param errback
@static
@memberOf comb
Executes a list of items in a serial manner . If the list contains promises then each promise will be executed in a serial manner if the list contains non async items then the next item in the list is called .