Lines Matching refs:accumulator
500 * @param {Function} setter The function to set `accumulator` values.
502 * @param {Object} accumulator The initial aggregated object.
503 * @returns {Function} Returns `accumulator`.
505 function arrayAggregator(array, setter, iteratee, accumulator) {
511 setter(accumulator, value, iteratee(value), array);
513 return accumulator;
684 * @param {*} [accumulator] The initial value.
689 function arrayReduce(array, iteratee, accumulator, initAccum) {
694 accumulator = array[++index];
697 accumulator = iteratee(accumulator, array[index], index, array);
699 return accumulator;
709 * @param {*} [accumulator] The initial value.
714 function arrayReduceRight(array, iteratee, accumulator, initAccum) {
717 accumulator = array[--length];
720 accumulator = iteratee(accumulator, array[length], length, array);
722 return accumulator;
918 * @param {*} accumulator The initial value.
924 function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
926 accumulator = initAccum
928 : iteratee(accumulator, value, index, collection);
930 return accumulator;
2540 * Aggregates elements of `collection` on `accumulator` with keys transformed
2545 * @param {Function} setter The function to set `accumulator` values.
2547 * @param {Object} accumulator The initial aggregated object.
2548 * @returns {Function} Returns `accumulator`.
2550 function baseAggregator(collection, setter, iteratee, accumulator) {
2552 setter(accumulator, value, iteratee(value), collection);
2554 return accumulator;
3233 * @param {Function} setter The function to set `accumulator` values.
3235 * @param {Object} accumulator The initial inverted object.
3236 * @returns {Function} Returns `accumulator`.
3238 function baseInverter(object, setter, iteratee, accumulator) {
3240 setter(accumulator, iteratee(value), key, object);
3242 return accumulator;
4876 * @param {Function} setter The function to set accumulator values.
4877 * @param {Function} [initializer] The accumulator object initializer.
4883 accumulator = initializer ? initializer() : {};
4885 return func(collection, setter, getIteratee(iteratee, 2), accumulator);
5264 * @param {Function} setter The function to set accumulator values.
9711 * invocation is supplied the return value of the previous. If `accumulator`
9714 * (accumulator, value, index|key, collection).
9729 * @param {*} [accumulator] The initial value.
9745 function reduce(collection, iteratee, accumulator) {
9749 return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
9762 * @param {*} [accumulator] The initial value.
9774 function reduceRight(collection, iteratee, accumulator) {
9778 return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
13828 * `accumulator` object which is the result of running each of its own
13830 * potentially mutating the `accumulator` object. If `accumulator` is not
13832 * iteratee is invoked with four arguments: (accumulator, value, key, object).
13841 * @param {*} [accumulator] The custom accumulator value.
13856 function transform(object, iteratee, accumulator) {
13861 if (accumulator == null) {
13864 accumulator = isArr ? new Ctor : [];
13867 accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
13870 accumulator = {};
13874 return iteratee(accumulator, value, index, object);
13876 return accumulator;