fun1.cpp 259 Bytes Edit Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #include <algorithm> #include <functional> #include <iostream> #include <vector> using namespace std; int main() { function<int(int, int)> f = [](int x, int y) -> int { int z = x + y; return z + x; }; cout << f(3, 4) << endl; };