function reduce(arr, iter, base) {
    return _.reduce(arr, function(prev, elem, i) {
        return prev.then(function(val) {
            return iter(val, elem, i);
        });
    }, Q(base));
}
// Reduce an array to a promise
Reduce an array to a promise
Reduce an array to a promise
function reduce(arr, iter, base) {
    return _.reduce(arr, function(prev, elem, i) {
        return prev.then(function(val) {
            return iter(val, elem, i);
        });
    }, Q(base));
}
function reduce ( arr , iter , base ) { return _ . reduce ( arr , function ( prev , elem , i ) { return prev . then ( function ( val ) { return iter ( val , elem , i ) ; } ) ; } , Q ( base ) ) ; }
Reduce an array to a promise
Reduce an array to a promise