fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. auto add_f = [](auto a) { return [=](auto b) { return a+b; }; };
  7.  
  8. std::cout << add_f (1)(2) << std::endl;
  9.  
  10. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
3