3 ms·
That's called Currying. The Add function isn't partial, it has been partially applied, so its the application of the function that maybe called partial. Differ
by srean 5y ago
That's called Currying. The Add function isn't partial, it has been partially applied, so its the application of the function that maybe called partial.
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
- Akronymus 5y ago> That's called Currying. 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)
- srean 5y ago> Actually no. Currying is converting one function with multiple arguments to a series of functions with one each 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
- Akronymus 5y agoIt seems I misinterpreted your comment then. I thought you were talking about the applying part as currying, which is really common. So I kinda short circuited my reasoning and instantly went for the UMM AKTSCHUALLY.