function invoke(collection, methodName) {
      var index = -1,
          isFunc = typeof methodName == 'function',
          length = collection ? collection.length : 0,
          result = Array(typeof length == 'number' ? length : 0);

      if (arguments.length < 3 && isArray(collection)) {
        while (++index < length) {
          var value = collection[index];
          result[index] = isFunc ? methodName.call(value) : value[methodName]();
        }
      } else {
        var args = slice(arguments, 2);
        baseEach(collection, function(value) {
          result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args);
        });
      }
      return result;
    }
Invokes the method named by `methodName` on each element in the `collection`
returning an array of the results of each invoked method. Additional arguments
will be provided to each invoked method. If `methodName` is a function it
will be invoked for, and `this` bound to, each element in the `collection`.

@static
@memberOf _
@category Collections
@param {Array|Object|string} collection The collection to iterate over.
@param {Function|string} methodName The name of the method to invoke or
 the function invoked per iteration.
@param {...*} [args] Arguments to invoke the method with.
@returns {Array} Returns a new array of the results of each invoked method.
@example

_.invoke([[5, 1, 7], [3, 2, 1]], 'sort');
// => [[1, 5, 7], [1, 2, 3]]

_.invoke([123, 456], String.prototype.split, '');
// => [['1', '2', '3'], ['4', '5', '6']]