DEV Community

Discussion on: Introduction to Currying in JavaScript

Collapse
jonrandy profile image
Jon Randy • Edited on

Great intro. I'm considering writing a library using my recent project so that we can easily use curried versions of our functions using the following syntax:

function add(a, b) {
  return a+b
}

const add3 = add[curried](3)

console.log(add3(2))  // 5
Enter fullscreen mode Exit fullscreen mode

What do you think?