fn inspect<O>(self, operation: O) -> Inspect<Self, O>
    where
        O: Fn(&Self::Item) + Clone + Send + 'a,
    {
        Inspect::new(self, operation)
    }
/// Applies `operation` to a reference to each item of this iterator,
/// producing a new iterator passing through the original items.  This is
/// often useful for debugging to see what's happening in iterator stages.
///
/// # Examples
///
/// ```
/// use asparit::*;
///
/// let a = [1, 4, 2, 3];
///
/// // this iterator sequence is complex.
/// let sum = a
///     .par_iter()
///     .cloned()
///     .filter(|&x| x % 2 == 0)
///     .reduce(|| 0, |sum, i| sum + i)
///     .exec();
///
/// println!("{}", sum);
///
/// // let's add some inspect() calls to investigate what's happening
/// let sum = a
///     .par_iter()
///     .cloned()
///     .inspect(|x| println!("about to filter: {}", x))
///     .filter(|&x| x % 2 == 0)
///     .inspect(|x| println!("made it through filter: {}", x))
///     .reduce(|| 0, |sum, i| sum + i)
///     .exec();
///
/// println!("{}", sum);
/// ```
Applies `operation` to a reference to each item of this iterator,
producing a new iterator passing through the original items.  This is
often useful for debugging to see what's happening in iterator stages.
Applies ` operation ` to a reference to each item of this iterator producing a new iterator passing through the original items . This is often useful for debugging to see what ' s happening in iterator stages .
fn inspect<O>(self, operation: O) -> Inspect<Self, O>
    where
        O: Fn(&Self::Item) + Clone + Send + 'a,
    {
        Inspect::new(self, operation)
    }
fn inspect < O > ( self , operation : O ) -> Inspect < Self , O > where O : Fn ( & Self :: Item ) + Clone + Send + ' a , { Inspect :: new ( self , operation ) }
Applies `operation` to a reference to each item of this iterator,
producing a new iterator passing through the original items.
Applies ` operation ` to a reference to each item of this iterator producing a new iterator passing through the original items .
self
operation
O
self
operation
O
examples




this iterator sequence is complex.



let's add some inspect() calls to investigate what's happening
let sum = a
.par_iter()
.cloned()
.inspect(|x| println!("about to filter: {}", x))
.filter(|&x| x % 2 == 0)
.inspect(|x| println!("made it through filter: {}", x))
.reduce(|| 0, |sum, i| sum + i)
.exec().


this iterator sequence is complex . let ' s add some inspect () calls to investigate what ' s happening let sum = a . par_iter () . cloned () . inspect ( |x| println! ( " about to filter : {} " x )) . filter ( |&x| x % 2 == 0 ) . inspect ( |x| println! ( " made it through filter : {} " x )) . reduce ( || 0 |sum i| sum + i ) . exec () .