Implementing c++ lambda functions?

Example:


  // Some C++ code without lambda
  

Solution:


  int main() {
      auto lambda = [](int x, int y) -> int {
          return x + y;
      };
      int result = lambda(5, 3);
  }
  

Beginner's Guide to C++