* Reduces `collection` to a value which is the accumulated result of running * each element in `collection` thru `iteratee`, where each successive * invocation is supplied the return value of the previous. If `accumulator` * is not given, the first element of `collection`
(collection, iteratee, accumulator)
| 20302 | * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) |
| 20303 | */ |
| 20304 | function reduce(collection, iteratee, accumulator) { |
| 20305 | var func = isArray(collection) ? arrayReduce : baseReduce, |
| 20306 | initAccum = arguments.length < 3; |
| 20307 | |
| 20308 | return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); |
| 20309 | } |
| 20310 | |
| 20311 | /** |
| 20312 | * This method is like `_.reduce` except that it iterates over elements of |
no test coverage detected