fn try_for_each<E, F>(&self, mut f: F) -> Result<(), E>
    where
        F: FnMut(Id) -> Result<(), E>,
        E: Clone,
    {
        self.fold(Ok(()), |res, id| res.and_then(|_| f(id)))
    }
/// Runs a falliable function on each child, stopping if the function returns
/// an error.
Runs a falliable function on each child, stopping if the function returns
an error.
Runs a falliable function on each child stopping if the function returns an error .
fn try_for_each<E, F>(&self, mut f: F) -> Result<(), E>
    where
        F: FnMut(Id) -> Result<(), E>,
        E: Clone,
    {
        self.fold(Ok(()), |res, id| res.and_then(|_| f(id)))
    }
fn try_for_each < E , F > ( & self , mut f : F ) -> Result < ( ) , E > where F : FnMut ( Id ) -> Result < ( ) , E > , E : Clone , { self . fold ( Ok ( ( ) ) , | res , id | res . and_then ( | _ | f ( id ) ) ) }
Runs a falliable function on each child, stopping if the function returns
an error.
Runs a falliable function on each child stopping if the function returns an error .
&self
f
F
&self
f
F