I\'m trying to use the negation of a boolean function in Scala, such as:
def someFunction(x: Set, p: Int => Boolean): Boolean = someOtherFunction(x,
The negation of p is a function that applies p to its argument and negates the result.
p
x => !p(x)
If you want to be able to write !p or p && q you can use this library, which pimps functions that return a bool with various logical operators.
!p
p && q