I know I’m getting boring with currying, but I have finished most of what I originally wanted. And I am publishing the code this time. It is published under GPL.
Now, a curried function can be invoked with a single call, like a regular function; in two calls; or in as many calls as you wish - the only limit is the actual number of arguments. So, all of the following works:
On reddit, a very nice explanation of currying by m42a contained this piece of code:
It returns a new function that is same as f, but with the first argument set to
- (see the post why this is more practical than std::bind). With the new version of curry.h, you don’t even need to uncurry the function, you can just do this:
Here are a few documented examples of what you can do:
And here is the header file: curry/curry.h