From 0429f27c54f2b869f519959d44b74578cc12d192 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 23 Sep 2015 22:44:53 -0700 Subject: [PATCH] Cleanup doc examples for `lodash` and `_.map`. [ci skip] --- lodash.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lodash.js b/lodash.js index 919dd8e5e..28da12737 100644 --- a/lodash.js +++ b/lodash.js @@ -1474,18 +1474,18 @@ * @returns {Object} Returns the new `lodash` wrapper instance. * @example * + * function square(n) { + * return n * n; + * } + * * var wrapped = _([1, 2, 3]); * * // returns an unwrapped value - * wrapped.reduce(function(sum, n) { - * return sum + n; - * }); + * wrapped.reduce(_.add); * // => 6 * * // returns a wrapped value - * var squares = wrapped.map(function(n) { - * return n * n; - * }); + * var squares = wrapped.map(square); * * _.isArray(squares); * // => false @@ -6605,14 +6605,14 @@ * @returns {Array} Returns the new mapped array. * @example * - * function timesThree(n) { - * return n * 3; + * function square(n) { + * return n * n; * } * - * _.map([1, 2], timesThree); + * _.map([1, 2], square); * // => [3, 6] * - * _.map({ 'a': 1, 'b': 2 }, timesThree); + * _.map({ 'a': 1, 'b': 2 }, square); * // => [3, 6] (iteration order is not guaranteed) * * var users = [