DEV Community

Discussion on: What is your favourite function()?

Collapse
kozlown profile image
Nigel

curry function is probably my prefered one.
For those who don't know its utility, here's a basic example:

const divide = curry((a, b) => a / b)
const divide4By = divide(4)

console.log(divide4by(2))
// 2

I even made my own optimized version 😄
npmjs.com/package/super-curry.