Why should i use a function inside a certain function to log this kind of output?

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 .

con1

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:


1 Like

thanks a lot ieahleen