While a lambda expression is the most common way of passing a value for a function type, it is not the only option.

If you have a function that matches the signature of the function type (same parameters and same return type), you can use a function reference.

For a top-level function, such as lessThanZero() in this snippet, you can refer to the function via a :: prefix (and leaving off the parentheses), to pass it as a value to a function type.

You can learn more about this in:
Run Edit