matchesPredicate

Asserts if the values satisfies the predicate provided.

val divisibleBy5 : (Int) -> Boolean = { it % 5 == 0 }
assert(10).matchesPredicate(divisibleBy5)