code: function invalidArgumentsLength(
      typeInfo,           // :: TypeInfo
      index,              // :: Integer
      numArgsExpected,    // :: Integer
      args                // :: Array Any
    ) {
      return new TypeError (trimTrailingSpaces (
        q (typeInfo.name) +
        ' applied ' + q (show (typeInfo.types[index])) +
        ' to the wrong number of arguments\n\n' +
        underline (
          typeInfo,
          K (K (_)),
          function(index_) {
            return function(f) {
              return function(t) {
                return function(propPath) {
                  return function(s) {
                    return index_ === index ?
                      t.format (_, function(k) { return k === '$1' ? f : _; }) :
                      _ (s);
                  };
                };
              };
            };
          }
        ) + '\n' +
        'Expected ' + numArgs (numArgsExpected) +
        ' but received ' + numArgs (args.length) +
        toMarkdownList ('.\n', ':\n\n', show, args)
      ));
    }
docs: invalidArgumentsLength :: ... -> Error  This function is used in `wrapFunctionCond` to ensure that higher-order functions defined via `def` only ever apply a function argument to the correct number of arguments.