#include #include #include "prelude.h" using namespace fcpp; using std::string; using std::cout; using std::endl; struct Foo { template struct Sig : public FunType {}; template typename F::ResultType operator()( const F& f ) const { typedef typename F::ResultType T; T x = T(); return f(x); } } foo; int main() { string y = "yadda:"; Fun1 n = logicalNot; Fun1 i = inc; Fun1 s = fcpp::plus(y); cout << foo(n) << endl; // true cout << foo(i) << endl; // 1 cout << foo(s) << endl; // "yadda:" }