Question is why program print id:0, id:1, id:2, 42 instead of id:42, id:43, id:44, 45.
int main()
{
int id = 0;
auto f = [id] () mutable {
std::cout << "id: " << id << std::endl;
++id; // OK
};
id = 42;
f();
f();
f();
std::cout << id << std::endl;
return 0;
}