lib/utils/promise.js
function reduce(arr, iter, base) {
    arr = Immutable.Iterable.isIterable(arr)? arr : Immutable.List(arr);

    return arr.reduce(function(prev, elem, key) {
        return prev
        .then(function(val) {
            return iter(val, elem, key);
        });
    }, Q(base));
}
function reduce(arr, iter, base) {
    arr = Immutable.Iterable.isIterable(arr)? arr : Immutable.List(arr);

    return arr.reduce(function(prev, elem, key) {
        return prev
        .then(function(val) {
            return iter(val, elem, key);
        });
    }, Q(base));
}
function reduce ( arr , iter , base ) { arr = Immutable . Iterable . isIterable ( arr ) ? arr : Immutable . List ( arr ) ; return arr . reduce ( function ( prev , elem , key ) { return prev . then ( function ( val ) { return iter ( val , elem , key ) ; } ) ; } , Q ( base ) ) ; }
Reduce an array to a promise

@param {Array|List} arr
@param {Function(value, element, index)}
@return {Promise<Mixed>}
Reduce an array to a promise