fn with partials appended to the arguments it receives....) to append partials to the list of arguments of fn.const partialRight = (fn, ...partials) => (...args) => fn(...args, ...partials);
const greet = (greeting, name) => greeting + ' ' + name + '!'; const greetJohn = partialRight(greet, 'John'); greetJohn('Hello'); // 'Hello John!'
Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️