#include "prelude.h" #include #include using std::cout; using std::endl; int main() { using fcpp::greater; using fcpp::minus; using fcpp::plus; cout << minus(7,4) << endl; cout << minus(7)(4) << endl; cout << minus(_,4)(7) << endl; cout << minus(7,_)(4) << endl; cout << until( greater(_,9), inc, 1 ) << endl; cout << until( greater(_,9), inc )(1) << endl; cout << until( greater(_,9) )(inc,1) << endl; cout << until( _, inc, _ )( greater(_,9), 1) << endl; cout << until( _, inc )( greater(_,9), 1) << endl; cout << until( _, _, 1 )( greater(_,9), inc) << endl; cout << until( greater(_,9), _, _ )(inc,1) << endl; cout << until( _, inc, 1 )(greater(_,9)) << endl; cout << until( greater(_,9), _, 1 )(inc) << endl; cout << until( greater(_,9), inc, _ )(1) << endl; cout << until( greater(_,9) )(inc)(1) << endl; cout << until( greater(_,9), _ )(inc)(1) << endl; cout << until( greater(_,9), _, _ )(inc)(1) << endl; cout << "test" << endl; cout << until( _, inc, _ )(greater(_,9) )(1) << endl; cout << until( _, _, 1 )(greater(_,9) )(inc) << endl; //Fun2 f = monomorphize2( minus ); Fun2 f = makeFun2(monomorphize2( minus )); cout << f(_,4)(5) << endl; Fun1 sub4 = f(_,4); cout << sub4(5) << endl; Fun1 decrement = minus(_,1); Fun1 in = inc; cout << decrement(9) << ' ' << in(7) << endl; Fun2 z = minus; cout << z(7,1) << endl; cout << z(7,_)(1) << endl; cout << minus(7,_)(1) << endl; //makeFun2(minus); }