(No general “functional programming” tag, so I used “haskell” which seemed like the next closest thing. If that’s an abuse of the tag, sorry!)
What in the world is with the bracket notation?
x.matchE( [](int& x){ ++x; }, [](const std::string& x){ std::cout << x; } );
That’s C++11 lambda syntax.
(No general “functional programming” tag, so I used “haskell” which seemed like the next closest thing. If that’s an abuse of the tag, sorry!)
What in the world is with the bracket notation?
That’s C++11 lambda syntax.