dist/iterable/operators.js
function reduce(predicate, initial) {
    return function (iterable) {
        let index = 0;
        let prevState = initial;
        for (const value of iterable) {
            prevState = predicate(prevState, value, index);
            index = index + 1;
        }
        return prevState;
    };
}
function reduce(predicate, initial) {
    return function (iterable) {
        let index = 0;
        let prevState = initial;
        for (const value of iterable) {
            prevState = predicate(prevState, value, index);
            index = index + 1;
        }
        return prevState;
    };
}
function reduce ( predicate , initial ) { return function ( iterable ) { let index = 0 ; let prevState = initial ; for ( const value of iterable ) { prevState = predicate ( prevState , value , index ) ; index = index + 1 ; } return prevState ; } ; }
Reduce the items in an iterable down to a single instance of initial type, returning the final result result of the reduction
Reduce the items in an iterable down to a single instance of initial type returning the final result result of the reduction