// PR_3_4.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>


int _tmain(int argc, _TCHAR* argv[])

{
    int c=3;
    std::cout<<"c="<<c<<std::endl;
	[&] {c++;}();
    std::cout<<"Po wyrazeniu lambda c="<<c<<std::endl;
	std::cout<<[c] (int x, int y) mutable -> int {return x + y + c;}(2,3)<<std::endl;
	for (int n=0; n<10;[&n] {n++;std::cout<<n<<" ";}());
	system("pause");

	return 0;
}

