fn map_with<O, T, S>(self, init: S, operation: O) -> MapWith<Self, S, O>
    where
        O: Fn(&mut S, Self::Item) -> T + Clone + Send,
        S: Send + Clone,
        T: Send,
    {
        MapWith::new(self, init, operation)
    }
/// Applies `operation` to the given `init` value with each item of this
/// iterator, producing a new iterator with the results.
///
/// 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();
///
/// let a: Vec<_> = (0..5)
///     .into_par_iter() // iterating over i32
///     .map_with(sender, |s, x| {
///         s.send(x).unwrap(); // sending i32 values through the channel
///         x // returning i32
///     })
///     .collect() // collecting the returned values into a vector
///     .exec();
///
/// let mut b: Vec<_> = receiver
///     .iter() // iterating over the values in the channel
///     .collect(); // and collecting them
/// b.sort();
///
/// assert_eq!(a, b);
/// ```
Applies `operation` to the given `init` value with each item of this
iterator, producing a new iterator with the results.

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`.
Applies ` operation ` to the given ` init ` value with each item of this iterator producing a new iterator with the results . 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 map_with<O, T, S>(self, init: S, operation: O) -> MapWith<Self, S, O>
    where
        O: Fn(&mut S, Self::Item) -> T + Clone + Send,
        S: Send + Clone,
        T: Send,
    {
        MapWith::new(self, init, operation)
    }
fn map_with < O , T , S > ( self , init : S , operation : O ) -> MapWith < Self , S , O > where O : Fn ( & mut S , Self :: Item ) -> T + Clone + Send , S : Send + Clone , T : Send , { MapWith :: new ( self , init , operation ) }
Applies `operation` to the given `init` value with each item of this
iterator, producing a new iterator with the results.
Applies ` operation ` to the given ` init ` value with each item of this iterator producing a new iterator with the results .
self
init
S
operation
O
self
init
S
operation
O
examples
```
use asparit::*;
use std::sync::mpsc::channel.

let (sender, receiver) = channel().

let a: Vec<_> = (0..5)
.into_par_iter() // iterating over i32
.map_with(sender, |s, x| {
s.send(x).unwrap(); // sending i32 values through the channel
x // returning i32
})
.collect() // collecting the returned values into a vector
.exec().

let mut b: Vec<_> = receiver
.iter() // iterating over the values in the channel
.collect(); // and collecting them
b.sort().


` ` ` use asparit :: * ; use std :: sync :: mpsc :: channel . let ( sender receiver ) = channel () . let a : Vec<_ > = ( 0 .. 5 ) . into_par_iter () // iterating over i32 . map_with ( sender |s x| { s . send ( x ) . unwrap () ; // sending i32 values through the channel x // returning i32 } ) . collect () // collecting the returned values into a vector . exec () . let mut b : Vec<_ > = receiver . iter () // iterating over the values in the channel . collect () ; // and collecting them b . sort () .