[][src]Trait mod_utilities::Reduce

pub trait Reduce: Iterator {
    fn reduce<F>(self, f: F) -> Self::Item
    where
        F: Fn(Self::Item, Self::Item) -> Self::Item
; }

Provides an iterator reduction method similar to Iterator::fold, but the accumulator is initialized by taking the first element of the iterator

Required methods

fn reduce<F>(self, f: F) -> Self::Item where
    F: Fn(Self::Item, Self::Item) -> Self::Item

Standard iterator reduction where the accumulator is initialized with the first value of the iterator before the callback is called

Loading content...

Implementors

impl<T> Reduce for T where
    T: Iterator
[src]

Loading content...