fn for_each_with<O, T>(self, init: T, operation: O) -> Collect<MapWith<Self, T, O>, ()>
    where
        O: Fn(&mut T, Self::Item) + Clone + Send + 'a,
        T: Clone + Send + 'a,
    {
        self.map_with(init, operation).collect()
    }
/// Executes `operation` on the given `init` value with each item produced by
/// the iterator, in parallel.
///
/// The `init` value will be cloned only as needed to be paired with
/// the group of items in each rayon job.  It does not require the type
/// to be `Sync`.
///
/// # Examples
///
/// ```
/// use asparit::*;
/// use std::sync::mpsc::channel;
///
/// let (sender, receiver) = channel();
///
/// (0..5)
///     .into_par_iter()
///     .for_each_with(sender, |s, x| s.send(x).unwrap())
///     .exec();
///
/// let mut res: Vec<_> = receiver.iter().collect();
///
/// res.sort();
///
/// assert_eq!(&res[..], &[0, 1, 2, 3, 4])
/// ```
Executes `operation` on the given `init` value with each item produced by
the iterator, in parallel.

The `init` value will be cloned only as needed to be paired with
the group of items in each rayon job.  It does not require the type
to be `Sync`.
Executes ` operation ` on the given ` init ` value with each item produced by the iterator in parallel . The ` init ` value will be cloned only as needed to be paired with the group of items in each rayon job . It does not require the type to be ` Sync ` .
fn for_each_with<O, T>(self, init: T, operation: O) -> Collect<MapWith<Self, T, O>, ()>
    where
        O: Fn(&mut T, Self::Item) + Clone + Send + 'a,
        T: Clone + Send + 'a,
    {
        self.map_with(init, operation).collect()
    }
fn for_each_with < O , T > ( self , init : T , operation : O ) -> Collect < MapWith < Self , T , O > , ( ) > where O : Fn ( & mut T , Self :: Item ) + Clone + Send + ' a , T : Clone + Send + ' a , { self . map_with ( init , operation ) . collect ( ) }
Executes `operation` on the given `init` value with each item produced by
the iterator, in parallel.
Executes ` operation ` on the given ` init ` value with each item produced by the iterator in parallel .
self
init
T
operation
O
self
init
T
operation
O
examples
```
use asparit::*;
use std::sync::mpsc::channel.

let (sender, receiver) = channel().



let mut res: Vec<_> = receiver.iter().collect().




` ` ` use asparit :: * ; use std :: sync :: mpsc :: channel . let ( sender receiver ) = channel () . let mut res : Vec<_ > = receiver . iter () . collect () .