function map(arr, iter) {
    return reduce(arr, function(prev, entry, i) {
        return Q(iter(entry, i))
        .then(function(out) {
            prev.push(out);
            return prev;
        });
    }, []);
}
// Map an array using an async (promised) iterator
Map an array using an async (promised) iterator
Map an array using an async ( promised ) iterator
function map(arr, iter) {
    return reduce(arr, function(prev, entry, i) {
        return Q(iter(entry, i))
        .then(function(out) {
            prev.push(out);
            return prev;
        });
    }, []);
}
function map ( arr , iter ) { return reduce ( arr , function ( prev , entry , i ) { return Q ( iter ( entry , i ) ) . then ( function ( out ) { prev . push ( out ) ; return prev ; } ) ; } , [ ] ) ; }
Map an array using an async (promised) iterator
Map an array using an async ( promised ) iterator