summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Yeates <yeatesgraeme@gmail.com>2016-07-12 16:51:52 -0400
committerGraeme Yeates <yeatesgraeme@gmail.com>2016-07-12 16:51:52 -0400
commite6b54c7995aa7a0e165f7eb80295db7df5d96f37 (patch)
treebdb85ab719a7a83410877d4f46646178cebc646a
parent548ae8db6383059f493d8bcb88cbc3d1c4b2f315 (diff)
downloadasync-iterable-docs.tar.gz
Document reduceRight as taking arrayiterable-docs
-rw-r--r--lib/reduceRight.js8
1 files 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);
}