From e6b54c7995aa7a0e165f7eb80295db7df5d96f37 Mon Sep 17 00:00:00 2001 From: Graeme Yeates Date: Tue, 12 Jul 2016 16:51:52 -0400 Subject: Document reduceRight as taking array --- lib/reduceRight.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/reduceRight.js b/lib/reduceRight.js index 1f976fe..844c94f 100644 --- a/lib/reduceRight.js +++ b/lib/reduceRight.js @@ -3,7 +3,7 @@ import reduce from './reduce'; var slice = Array.prototype.slice; /** - * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `coll` in reverse order. + * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order. * * @name reduceRight * @static @@ -12,7 +12,7 @@ var slice = Array.prototype.slice; * @see [async.reduce]{@link module:Collections.reduce} * @alias foldr * @category Collection - * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {Array} array - A collection to iterate over. * @param {*} memo - The initial state of the reduction. * @param {Function} iteratee - A function applied to each item in the * array to produce the next step in the reduction. The `iteratee` is passed a @@ -24,7 +24,7 @@ var slice = Array.prototype.slice; * `iteratee` functions have finished. Result is the reduced value. Invoked with * (err, result). */ -export default function reduceRight (coll, memo, iteratee, callback) { - var reversed = slice.call(coll).reverse(); +export default function reduceRight (array, memo, iteratee, callback) { + var reversed = slice.call(array).reverse(); reduce(reversed, memo, iteratee, callback); } -- cgit v1.2.1