Any returns true if the supplied predicate function matches any of the collection items:
val numbers = listOf(1, 2, 3, 4, 5)
val hasEvens = numbers.any { n -> n % 2 == 0 }
Any would return true in this case, as the predicate matches two items.
Any returns true if the supplied predicate function matches any of the collection items:
val numbers = listOf(1, 2, 3, 4, 5)
val hasEvens = numbers.any { n -> n % 2 == 0 }
Any would return true in this case, as the predicate matches two items.
3.135.219.209