The
bifind 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:
>>> bifind even (27, 53)
Nothing
>>> bifind even (27, 52)
Just 52
>>> bifind even (26, 52)
Just 26
Empty structures always yield
Nothing:
>>> bifind even (BiList [] [])
Nothing