pub fn find<T: std::clone::Clone>(ls: @List<T>, f: &fn(&T) -> bool) -> std::option::Option
Search for an element that matches a given predicate
Apply function f
to each element of v
, starting from the first.
When function f
returns true then an option containing the element
is returned. If f
matches no elements then none is returned.
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).