find : ('a -> bool) -> 'a list -> 'a
SYNOPSIS
Returns the first element of a list which satisfies a predicate.
DESCRIPTION
find p [x1;...;xn]
returns the first
xi
in the list such that
(p xi)
is
true
.
FAILURE CONDITIONS
Fails with
find
if no element satisfies the predicate. This will always be the case if the list is empty.
SEE ALSO
tryfind
,
mem
,
exists
,
forall
,
assoc
,
rev_assoc
.