diff --git a/lodash.src.js b/lodash.src.js index 10cd55172..0dc51b8b0 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -1699,6 +1699,13 @@ return false; } + /** + * A specialized version of `_.sum` for arrays without support for iteratees. + * + * @private + * @param {Array} array The array to iterate over. + * @returns {number} Returns the sum. + */ function arraySum(array) { var length = array.length, result = 0; @@ -2757,6 +2764,15 @@ }); } + /** + * The base implementation of `_.sum` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ function baseSum(collection, iteratee) { var result = 0; baseEach(collection, function(value, index, collection) {