You can also do currying directly without having a curry-fier.
For example...
const cf = (a) => (b) => (c) => (d) => { return a + b * c - d; }
One of the things that I like about "functional-first" functional programming languages is that currying is the norm (as is immutability, concise syntax, pattern matching, non-nullable references, tail recursion, emphasis on purity), and you'd have to go out of your way to not do currying. For example, in F#:
let cf a b c d = a + b * c - d
That function is curried. And partial application is equally easy and straightforward:
It does take more discipline to use the functional side of Javascript. I think I added a curry-fier because I wanted to play around with the number of arguments. But it does make it less readable.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You can also do currying directly without having a curry-fier.
For example...
const cf = (a) => (b) => (c) => (d) => { return a + b * c - d; }
One of the things that I like about "functional-first" functional programming languages is that currying is the norm (as is immutability, concise syntax, pattern matching, non-nullable references, tail recursion, emphasis on purity), and you'd have to go out of your way to not do currying. For example, in F#:
let cf a b c d = a + b * c - d
That function is curried. And partial application is equally easy and straightforward:
let pa x y = cf 10 20
It does take more discipline to use the functional side of Javascript. I think I added a curry-fier because I wanted to play around with the number of arguments. But it does make it less readable.