Sha256: 8676d2f29aa9e5025806c6fc50c6adb8cd1f03c6e500729c8e1eb3d0b2491995

Contents?: true

Size: 957 Bytes

Versions: 153

Compression:

Stored size: 957 Bytes

Contents

var arrayReduceRight = require('../internal/arrayReduceRight'),
    baseEachRight = require('../internal/baseEachRight'),
    createReduce = require('../internal/createReduce');

/**
 * This method is like `_.reduce` except that it iterates over elements of
 * `collection` from right to left.
 *
 * @static
 * @memberOf _
 * @alias foldr
 * @category Collection
 * @param {Array|Object|string} collection The collection to iterate over.
 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
 * @param {*} [accumulator] The initial value.
 * @param {*} [thisArg] The `this` binding of `iteratee`.
 * @returns {*} Returns the accumulated value.
 * @example
 *
 * var array = [[0, 1], [2, 3], [4, 5]];
 *
 * _.reduceRight(array, function(flattened, other) {
 *   return flattened.concat(other);
 * }, []);
 * // => [4, 5, 2, 3, 0, 1]
 */
var reduceRight = createReduce(arrayReduceRight, baseEachRight);

module.exports = reduceRight;

Version data entries

153 entries across 80 versions & 8 rubygems

Version Path
ilog-0.4.1 node_modules/contents/node_modules/lodash/collection/reduceRight.js
ilog-0.4.1 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/collection/reduceRight.js
ilog-0.4.1 node_modules/babel/node_modules/lodash/collection/reduceRight.js
ilog-0.4.0 node_modules/babel/node_modules/lodash/collection/reduceRight.js
ilog-0.4.0 node_modules/contents/node_modules/lodash/collection/reduceRight.js
ilog-0.4.0 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/collection/reduceRight.js
ilog-0.3.3 node_modules/babel/node_modules/lodash/collection/reduceRight.js
ilog-0.3.3 node_modules/contents/node_modules/lodash/collection/reduceRight.js
ilog-0.3.3 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/collection/reduceRight.js
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/reduceRight.js
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/inquirer/node_modules/lodash/collection/reduceRight.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/reduceRight.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/inquirer/node_modules/lodash/collection/reduceRight.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/reduceRight.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/inquirer/node_modules/lodash/collection/reduceRight.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/lodash/collection/reduceRight.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/reduceRight.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/inquirer/node_modules/lodash/collection/reduceRight.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/collection/reduceRight.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/inquirer/node_modules/lodash/collection/reduceRight.js