2 * A specialized version of `_.reduceRight` for arrays without support for
6 * @param {Array} array The array to iterate over.
7 * @param {Function} iteratee The function invoked per iteration.
8 * @param {*} [accumulator] The initial value.
9 * @param {boolean} [initAccum] Specify using the last element of `array` as the initial value.
10 * @returns {*} Returns the accumulated value.
12 function arrayReduceRight(array, iteratee, accumulator, initAccum) {
13 var length = array.length;
14 if (initAccum && length) {
15 accumulator = array[--length];
18 accumulator = iteratee(accumulator, array[length], length, array);
23 module.exports = arrayReduceRight;