by 0atman · 4y ago · 0 comments
I thought partial functions are functions where you don't supply all the arguments, so the return value is a new function that is ready to accept the missing arguments.
```pseudocode
add(1, 2) > 3
addtwo = add(2)
addtwo(3) > 5 ```
I'm certainly wrong because John D. Cook uses a lot of big words that I don't understand. CONFUSING
Different communities using the same word to mean different things is a problem. Especially so, if one isn't aware of it. Another overly abused and overloaded word is functor
Actually no. Currying is converting one function with multiple arguments to a series of functions with one each.
Partial application is supplying some of those arguments and getting back a series of functions that take more arguments.
So, currying = f(x,y,z) -> f'(x)(y)(z)
While partial application = f(x)(y)(z) + x and y being supplied -> f'(z)
It looked to me that exactly what he was doing, turning the function Add that takes to arguments to a series of two functions that takes one