This is an excellent article and is a great introduction.
When I did a similar article a couple of years ago I had the ability to pass a Missing Argument, meaning that you can create intermediates with any parameter missing - which is useful. Don't think I covered the arity stuff you did here.
Thanks! Combining partial application and currying together like you did is an interesting approach! I like the use of the Symbol for missing arguments. Older libraries like Lo-dash have you pass the library itself as the "missing" value, e.g. _.partial(operation, _, 'two');, which was useful before we had tools like Symbol.
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.
This is an excellent article and is a great introduction.
When I did a similar article a couple of years ago I had the ability to pass a Missing Argument, meaning that you can create intermediates with any parameter missing - which is useful. Don't think I covered the arity stuff you did here.
Spice up your Javascript with some powerful curry! (Functional Programming and Currying)
Mike Talbot ⭐ ・ Aug 3 '21
Thanks! Combining partial application and currying together like you did is an interesting approach! I like the use of the Symbol for missing arguments. Older libraries like Lo-dash have you pass the library itself as the "missing" value, e.g.
_.partial(operation, _, 'two');, which was useful before we had tools like Symbol.