fn find_map_first<O, T>(self, operation: O) -> FindMap<Self, O>
    where
        O: Fn(Self::Item) -> Option<T> + Clone + Send + 'a,
        T: Send,
    {
        FindMap::new(self, operation, FindMatch::First)
    }
/// Applies the given operation to the items in the parallel iterator and
/// returns the sequentially **first** non-None result of the map operation.
///
/// Once a non-None value is produced from the map operation, all attempts
/// to the right of the match will be stopped, while attempts to the left
/// must continue in case an earlier match is found.
///
/// Note that not all parallel iterators have a useful order, much like
/// sequential `HashMap` iteration, so "first" may be nebulous. If you
/// just want the first non-None value discovered anywhere in the iterator,
/// `find_map_any` is a better choice.
///
/// # Examples
///
/// ```
/// use asparit::*;
///
/// let c = ["lol", "NaN", "2", "5"];
///
/// let first_number = c.par_iter().find_map_first(|s| s.parse().ok()).exec();
///
/// assert_eq!(first_number, Some(2));
/// ```
Applies the given operation to the items in the parallel iterator and
returns the sequentially **first** non-None result of the map operation.

Once a non-None value is produced from the map operation, all attempts
to the right of the match will be stopped, while attempts to the left
must continue in case an earlier match is found.

Note that not all parallel iterators have a useful order, much like
sequential `HashMap` iteration, so "first" may be nebulous. If you
just want the first non-None value discovered anywhere in the iterator,
`find_map_any` is a better choice.
Applies the given operation to the items in the parallel iterator and returns the sequentially ** first ** non - None result of the map operation . Once a non - None value is produced from the map operation all attempts to the right of the match will be stopped while attempts to the left must continue in case an earlier match is found . Note that not all parallel iterators have a useful order much like sequential ` HashMap ` iteration so " first " may be nebulous . If you just want the first non - None value discovered anywhere in the iterator ` find_map_any ` is a better choice .
fn find_map_first<O, T>(self, operation: O) -> FindMap<Self, O>
    where
        O: Fn(Self::Item) -> Option<T> + Clone + Send + 'a,
        T: Send,
    {
        FindMap::new(self, operation, FindMatch::First)
    }
fn find_map_first < O , T > ( self , operation : O ) -> FindMap < Self , O > where O : Fn ( Self :: Item ) -> Option < T > + Clone + Send + ' a , T : Send , { FindMap :: new ( self , operation , FindMatch :: First ) }
Applies the given operation to the items in the parallel iterator and
returns the sequentially **first** non-None result of the map operation.
Applies the given operation to the items in the parallel iterator and returns the sequentially ** first ** non - None result of the map operation .
self
operation
O
self
operation
O
examples




let first_number = c.par_iter().find_map_first(|s| s.parse().ok()).exec().


let first_number = c . par_iter () . find_map_first ( |s| s . parse () . ok () ) . exec () .