:: (a -> Bool) -> [a] -> Maybe a package:cabal-install-solver

The find function takes a predicate and a structure and returns the leftmost element of the structure matching the predicate, or Nothing if there is no such element.

Examples

Basic usage:
>>> find (> 42) [0, 5..]
Just 45
>>> find (> 12) [1..7]
Nothing