An API expects single-argument callbacks, but the useful functions take two arguments. Instead of writing an adapter per function, bind the second argument once: the returned object remembers both the function and the value. This is partial application — std::bind does it in general form.
Implement toOneArg(f, x): given a two-argument function and a value for the SECOND argument, return an object callable with one argument. toOneArg(plus, 1) is an increment.
The object stores a function pointer and the bound value; operator()(a) forwards both.
Hit Submit (or ⌘/Ctrl + ↵) — test results will show up here.