In this statement:
return (t) -> test(t) && other.test(t);
the &&
operator has higher precedence than the ->
operator, so the expression is parsed as if:
return (t) -> (test(t) && other.test(t));
Thus, this returns the lambda expression itself, which is the logical AND of this predicate's test
method with the other predicate's test
method.