This function scans the entire collection and returns the item that satisfies the predicate. If no items or more than one item match the predicate, then it throws an Exception.
val numbers = listOf(1, 2, 3, 4, 5)
val number5 = numbers.single { n -> n > 4 }