Предварительно добавить аргументы функции
const partial = (fn, …partials) => (…args) => fn(…partials, …args);
const partialRight = (fn, …partials) => (…args) => fn(…args, …partials);
const greet = (greeting, name) => greeting + ' ' + name + '!'; const greetHello = partial(greet, 'Hello'); greetHello('John'); // 'Hello John!'
const greet = (greeting, name) => greeting + ' ' + name + '!'; const greetJohn = partialRight(greet, 'John'); greetJohn('Hello'); // 'Hello John!'