函数将其他函数和少数其他参数作为参数。将参数绑定到嵌套函数和 return 接收函数

Function take as an argument other function and few other arguments. Bind arguments to nested function and return recieved function

function bindFunction(fn, ...array) {
    let args = Array.from(arguments);
    function F() {
        return args;
    }
    return F.bind(bindFunction);
}

嵌套函数, 哪个外部函数作为第一个参数, 必须将其他参数绑定到嵌套函数 和 return 他们

我想这就是你要找的。

function bindFunction(fn, ...array) {
  return fn.bind(null, ...array);
}