Lambda functions, introduced since C++11, are convenient way of passing different types of callbacks, doing parametrized operations, etc. And as in many other languages, C++ lambdas are closures. That is, they can capture bindings from the outer scope, and use them inside. However they do this with some C++ specifics. …