2cl (pronounce "toccle") is a functional programming extension for C++
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 lines
276 B

#pragma once
namespace cl
{
template<typename fn, typename a>
class curry_t
{
fn call;
a param;
public:
curry_t(fn func, a p)
: call{func}
, param{p}
{}
template<typename ...b>
auto operator()(b ...Args){
return call(param, Args...);
}
};
}