function wrapImmutable(func, cloner) {
  return function() {
    var length = arguments.length;
    if (!length) {
      return;
    }
    var args = Array(length);
    while (length--) {
      args[length] = arguments[length];
    }
    var result = args[0] = cloner.apply(undefined, args);
    func.apply(undefined, args);
    return result;
  };
}
Creates a function that wraps `func` and uses `cloner` to clone the first
argument it receives.

@private
@param {Function} func The function to wrap.
@param {Function} cloner The function to clone arguments.
@returns {Function} Returns the new immutable function.