What's wrong with using a nested named functions instead?
You may already be aware, but not everyone is: they capture variables from outer scopes in exactly the same way that lambdas do.
You may already be aware, but not everyone is: they capture variables from outer scopes in exactly the same way that lambdas do.