auto L = [] {
std::cout << "Hello lambda" << std::endl;
};
//调用lambdas函数
L();
//int id = 0;
//auto f = [id]() mutable {
// std::cout << "id:" << id << std::endl;
// ++id;
//};
//id = 42;
//f();
//f();
//f();
//std::cout << id << std::endl;
//int id = 0;
//auto F = [&id](int param) {
// cout << "id:" << id << endl;
// ++id; ++param;
//};
//id = 42;
//F(7);
//F(7);
//F(7);
//cout << id << endl;
//int id = 0;
//auto f = [id]() mutable {
// cout << "id :" << id << endl;
// ++id;
// static int nTmp = 5;
// int y = 6;
// return id;
//};
//id = 42;
//
//cout << "result:" << f() << endl;
//f();
//vector<int> vi{5, 28, 50, 83, 70, 590, 245, 59, 24};
//int x = 30;
//int y = 100;
//vi.erase(remove_if(vi.begin(),
// vi.end(),
// [x, y](int n) {return x < n && n < y; }
// ),
// vi.end()
//);
//for (auto i : vi)
// cout << i << ' ';