i don’t really understand why should i use this kind of function? Because it works just fine in the first example of this picture .
So what is the second function for?
i don’t really understand why should i use this kind of function? Because it works just fine in the first example of this picture .
So what is the second function for?
in the first case you can’t do increment(5)(2)
this is called partial application, it is a way to reduce repeated code, and also is an important thing to know as it is one of the princples for some of the newer libraries and technologies that are used.
a couple of articles in which you can read about it:
thanks a lot ieahleen