The general syntax of a lambda function is: (parameterName1:parameterType1, parameterName2:parameterType2, ...) => expression When there is only one parameter, you can omit the parentheses. When the Expression Language can infer the data type, you can omit the parameter type too. Examples: foo => foo + 2 (foo:Integer, bar:Integer) => (foo * bar) (foo:Integer, bar) => foo + bar You can use a lambda function as a parameter of a function. The parameter type must be
values : List<String> = ["foo", "bar"]; values.anyMatch(value => value == "bar") | |||||||||||||