open fun toFunction(): ((T) -> Boolean!)!
Performs a conversion to a Function1
in case a predicate needs to be used in a function context.
Predicate
is not deriving Function1
for several reasons:
Return
((T) -> Boolean!)!: a function that is wrapping the predicate.