diff --git a/lodash.js b/lodash.js index 26db97667..251e5e482 100644 --- a/lodash.js +++ b/lodash.js @@ -4624,9 +4624,15 @@ */ function createOver(arrayFunc) { return rest(function(iteratees) { + var toIteratee = getIteratee(); + iteratees = (iteratees.length == 1 && isArray(iteratees[0])) - ? arrayMap(iteratees[0], getIteratee()) - : arrayMap(baseFlatten(iteratees, 1, isFlattenableIteratee), getIteratee()); + ? iteratees[0] + : baseFlatten(iteratees, 1, isFlattenableIteratee); + + iteratees = arrayMap(iteratees, function(iteratee) { + return toIteratee(iteratee, Infinity); + }); return rest(function(args) { var thisArg = this; diff --git a/test/test-fp.js b/test/test-fp.js index d119d3021..d694ed449 100644 --- a/test/test-fp.js +++ b/test/test-fp.js @@ -1443,6 +1443,21 @@ /*--------------------------------------------------------------------------*/ + QUnit.module('fp.over'); + + (function() { + QUnit.test('should not cap iteratee args', function(assert) { + assert.expect(2); + + _.each([fp.over, convert('over', _.over)], function(func) { + var over = func([Math.max, Math.min]); + assert.deepEqual(over(1, 2, 3, 4), [4, 1]); + }); + }); + }()); + + /*--------------------------------------------------------------------------*/ + QUnit.module('fp.omitBy and fp.pickBy'); _.each(['omitBy', 'pickBy'], function(methodName) {