A lambda function is an anonymous function that has a body but does not have a name. Similar to an ordinary function in C++ lambda functions can take arguments and return a value to the calling function. In addition a lambda function can also access the
variables that are available to the enclosing scope (environment variables).
Syntax of a lambda function is:
[ capture-list ] ( parameters ) -> return type { body of the function}