function memoize(func, resolver) {
      if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      var memoized = function() {
        var args = arguments,
            key = resolver ? resolver.apply(this, args) : args[0],
            cache = memoized.cache;

        if (cache.has(key)) {
          return cache.get(key);
        }
        var result = func.apply(this, args);
        memoized.cache = cache.set(key, result);
        return result;
      };
      memoized.cache = new memoize.Cache;
      return memoized;
    }
Creates a function that runs each argument through a corresponding
transform function.

@static
@memberOf _
@category Function
@param {Function} func The function to wrap.
@param {...(Function|Function[])} [transforms] The functions to transform
arguments, specified as individual functions or arrays of functions.
@returns {Function} Returns the new function.
@example

function doubled(n) {
  return n * 2;
}

function square(n) {
  return n * n;
}

var modded = _.modArgs(function(x, y) {
  return [x, y];
}, square, doubled);

modded(1, 2);
// => [1, 4]

modded(5, 10);
// => [25, 20]