first
Returns the first element in the collection.
Throws
if the collection is empty
Returns the first element in the collection for which predicate returns true
Return
The element for which predicate returns true.
Parameters
predicate
called with each element until it returns true.
Throws
if predicate returns false for all elements or the collection is empty.