find_first


Description:

public Future<Optional<G>> find_first (Predicate<G> pred)

Returns an optional describing the first element that matches the given predicate, or an empty optional if not found.

This operation respects encounter order even though the seq is in parallel mode.

This is a short-circuiting terminal operation.

Parameters:

pred

a non-interfering and stateless predicate

Returns:

a future of an optional describing the first element that matches the given, or an empty optional if not found.




2022 vala-language.org