The
find function takes a predicate and a list and returns the
first element in the list matching the predicate, or
Nothing if
there is no such element. For the result to be
Nothing, the
list must be finite.
Examples
>>> find (> 4) [1..]
Just 5
>>> find (< 0) [1..10]
Nothing
>>> find ('a' `elem`) ["john", "marcus", "paul"]
Just "marcus"