Another way that one might create a stateful lambda in C++11 by manipulating the storage duration of the variables in the lambda.