Tweak _.reduce documentation.

Former-commit-id: 58d8a724dbf53594420e355c3d29ae28b53a7886
This commit is contained in:
John-David Dalton
2012-12-22 11:57:14 -06:00
parent 32b5b5b1c4
commit bd8f882c94
2 changed files with 4 additions and 4 deletions

View File

@@ -1190,7 +1190,7 @@ _.pluck(stooges, 'name');
### <a id="_reducecollection--callbackidentity-accumulator-thisarg"></a>`_.reduce(collection [, callback=identity, accumulator, thisArg])`
<a href="#_reducecollection--callbackidentity-accumulator-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2465 "View in source") [&#x24C9;][1]
Boils down a `collection` to a single value. The initial state of the reduction is `accumulator` and each successive step of it should be returned by the `callback`. The `callback` is bound to `thisArg` and invoked with `4` arguments; for arrays they are *(accumulator, value, index|key, collection)*.
Reduces a `collection` to a single value. The initial state of the reduction is `accumulator` and each successive step of it should be returned by the `callback`. The `callback` is bound to `thisArg` and invoked with four arguments; for arrays they are *(accumulator, value, index|key, collection)*.
#### Aliases
*foldl, inject*

View File

@@ -2443,9 +2443,9 @@
}
/**
* Boils down a `collection` to a single value. The initial state of the
* reduction is `accumulator` and each successive step of it should be returned
* by the `callback`. The `callback` is bound to `thisArg` and invoked with 4
* Reduces a `collection` to a single value. The initial state of the reduction
* is `accumulator` and each successive step of it should be returned by the
* `callback`. The `callback` is bound to `thisArg` and invoked with four
* arguments; for arrays they are (accumulator, value, index|key, collection).
*
* @static