javascript currying implementation es6
const curry = (f, ...args) =>
args.length >= f.length
? f(...args)
: (...moreParams) => curry(f, ...args, ...moreParams)
const greet = curry((msg, name) => {
console.log(`${msg}`, name)
});
// Curry usage example:
const welcomeGreet = greet("Welcome")
const byeGreet = greet("Bye bye")
welcomeGreet("Pablo (sairov)")
welcomeGreet("Ale zapata")
byeGreet("Fernando")
byeGreet("Juan Sonido")