function baseAry(func, n) {
  return n == 2
    ? function(a, b) { return func(a, b); }
    : function(a) { return func(a); };
}
Creates a function that invokes `func`, with up to `n` arguments, ignoring
any additional arguments.

@private
@param {Function} func The function to cap arguments for.
@param {number} n The arity cap.
@returns {Function} Returns the new function.