-
Notifications
You must be signed in to change notification settings - Fork 0
curry
Ville Rissanen edited this page Sep 20, 2021
·
1 revision
- arguments... - variables to apply as curried arguments to the invokable.
This macro acts like a function. It inserts an empty lambda as a first argument for a call to:
template<typename UniqueDummy, typename... Arguments>
libletlib::detail::curry_(UniqueDummy&&, var const& invokable, Arguments const&... arguments)
which forces unique instantiations of the template because the C++ standard guarantees all lambdas are unique types.
let invokable = []lambda(st + nd);
let curried = curry(invokable, 2);
std::cout << curried(2) << std::endl; // print "4"
- Var
- Macros
- Built-ins
- Compilation options