As developers we all know the feeling or fear of being left behind at some point. Every day tens of new technologies (repositories) are trending in github, may be is the next React, x Script or Machine Learning framework and we like to know more about it.
So what can we do ?
Try to learn as much new things as we can or give up and stick with the good old tools we already know ?
I believe in being pragmatic, learn what really matters and wait for the right moment.
Yes, never follow the hype, you don’t need…
currying is the technique of translating the evaluation of a function that takes multiple arguments(or a tuple of arguments) into evaluating a sequence of functions, each with a single argument. — wikipedia
Let’s think about what we need: 1- A function that will receive another function to curry. 2-
return another function that will ask for 1 or more
arguments for the original function, this function should somehow save all the
arguments it received…
You can use Boolean, Number and String as:
If we use them with the
new keyword then we will always return an object - not what we expected: