Lambda expressions

Definition: Anonymous functions:

[capture](parameters)->return_type {body}

The parameter capture is defined as following:

[] //no variables defined. Using one will result in error
[x, &y] //x is captured by value, y is captured by reference
[&] //any external variable is implicitly captured by reference if used
[=] //any external variable is implicitly captured by value if used
[&, x] //x is explicitly captured by value. Other variables will be captured by reference
[=, &z] //z is explicitly captured by reference. Other variables will be captured by value