export function runningReduce(array, reducer, initialValue) {
    let currentResult = initialValue;
    return array.map((el, currentIndex) => currentResult = reducer(currentResult, el, currentIndex));
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVubmluZ19yZWR1Y2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJydW5uaW5nX3JlZHVjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQkEsTUFBTSxVQUFVLGFBQWEsQ0FDM0IsS0FBbUIsRUFDbkIsT0FBZ0UsRUFDaEUsWUFBZTtJQUVmLElBQUksYUFBYSxHQUFHLFlBQVksQ0FBQztJQUNqQyxPQUFPLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQyxFQUFFLEVBQUUsWUFBWSxFQUFFLEVBQUUsQ0FDcEMsYUFBYSxHQUFHLE9BQU8sQ0FBQyxhQUFhLEVBQUUsRUFBRSxFQUFFLFlBQVksQ0FBQyxDQUN6RCxDQUFDO0FBQ0osQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8vIENvcHlyaWdodCAyMDE4LTIwMjEgdGhlIERlbm8gYXV0aG9ycy4gQWxsIHJpZ2h0cyByZXNlcnZlZC4gTUlUIGxpY2Vuc2UuXG4vLyBUaGlzIG1vZHVsZSBpcyBicm93c2VyIGNvbXBhdGlibGUuXG5cbi8qKlxuICogQ2FsbHMgdGhlIGdpdmVuIHJlZHVjZXIgb24gZWFjaCBlbGVtZW50IG9mIHRoZSBnaXZlbiBjb2xsZWN0aW9uLCBwYXNzaW5nIGl0J3NcbiAqIHJlc3VsdCBhcyB0aGUgYWNjdW11bGF0b3IgdG8gdGhlIG5leHQgcmVzcGVjdGl2ZSBjYWxsLCBzdGFydGluZyB3aXRoIHRoZSBnaXZlblxuICogaW5pdGlhbFZhbHVlLiBSZXR1cm5zIGFsbCBpbnRlcm1lZGlhdGUgYWNjdW11bGF0b3IgcmVzdWx0cy5cbiAqXG4gKiBFeGFt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