Lambda expressions
Lambda expressions are used when we want to define a function inline without giving it any name.
The following example shows the lambda expression of go+ style, which is more compact and easy to understand.
If we want a lambda to be defined without being executed, we only omit its identifier. For example:
If we want the lambda to be defined and executed, we omit its identifier and add an argument list in parentheses after the body’s closing curly brace. For example:
Next example: Recursion