Currying is mainly a way to setup a function for easier partial application -- providing only some of the function arguments. You can do partial application without currying, but it is less convenient.
// currying partial application let add = a => b => a + b let add2 = add(2) add2(7) // 9 // non-currying partial application let add = (a, b) => a + b let add2 = b => add(2, b) add2(7) // 9
Thanks π Added a note with a link to this comment to the post itself.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
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.
Currying is mainly a way to setup a function for easier partial application -- providing only some of the function arguments. You can do partial application without currying, but it is less convenient.
Thanks π Added a note with a link to this comment to the post itself.