"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.reduce = void 0;
const scanInternals_js_1 = require("./scanInternals.js");
const Observable_js_1 = require("../Observable.js");
function reduce(accumulator, seed) {
    const hasSeed = arguments.length >= 2;
    return (source) => new Observable_js_1.Observable((subscriber) => (0, scanInternals_js_1.scanInternals)(accumulator, seed, hasSeed, false, true, source, subscriber));
}
exports.reduce = reduce;