Skip to content

Commit 6144980

Browse files
fix missing parameter in doc of reduce
1 parent 8c53661 commit 6144980

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/reduce/_reduce.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @example
1010
* _reduce( ( x , y ) => x + y , range( 10 ) , 100 ) ; // returns 145
1111
*
12+
* @param {Function} accumulator - The accumulator, a 2-ary function.
1213
* @param {Iterable} iterable - The input iterable.
1314
* @param {Object} initializer - The initial value of the reduction.
1415
* @returns {Object} - The reduction of the elements of <code>iterable</code>.

src/reduce/reduce.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ import { iter } from '../base/iter' ;
1313
* @example
1414
* _reduce( ( x , y ) => x + y , range( 10 ) , 100 ) ; // returns 145
1515
*
16+
* @param {Function} accumulator - The accumulator, a 2-ary function.
1617
* @param {Iterable} iterable - The input iterable.
17-
* @param {Object} initializer - The initial value of the reduction.
18+
* @param {Object} [initializer=undefined] - The initial value of the reduction.
1819
* @returns {Object} - The reduction of the elements of <code>iterable</code>.
1920
*/
20-
2121
export function reduce ( accumulator , iterable , initializer = undefined ) {
2222

2323
if ( initializer === undefined ) {

0 commit comments

Comments
 (0)