/// An iterator adaptor that yields the computation of the closure `F` over the
/// accumulated value and the next element of the preceding iterator.
///
/// `accumulate()` takes a function or closure with two arguments,
/// the first being the previous yielded value and the second an element from the preceding iterator.
/// The iterator maintains the state of the last yielded value.
///
/// The first element of the preceding iterator is yielded as-is.
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use rs3cache::utils::adapters::Accumulator;
///
/// let mut iter = (1..6).accumulate(|x, y| x + y);
///
/// assert_eq!(iter.next(), Some(1));  // 1
/// assert_eq!(iter.next(), Some(3));  // 1+2
/// assert_eq!(iter.next(), Some(6));  // (1+2) + 3
/// assert_eq!(iter.next(), Some(10)); // (1+2+3) + 4
/// assert_eq!(iter.next(), Some(15)); // (1+2+3+4) + 5
/// assert_eq!(iter.next(), None);
/// ```
An iterator adaptor that yields the computation of the closure `F` over the
accumulated value and the next element of the preceding iterator.

`accumulate()` takes a function or closure with two arguments,
the first being the previous yielded value and the second an element from the preceding iterator.
The iterator maintains the state of the last yielded value.

The first element of the preceding iterator is yielded as-is.
An iterator adaptor that yields the computation of the closure ` F ` over the accumulated value and the next element of the preceding iterator . ` accumulate () ` takes a function or closure with two arguments the first being the previous yielded value and the second an element from the preceding iterator . The iterator maintains the state of the last yielded value . The first element of the preceding iterator is yielded as - is .
fn accumulate<F>(self, f: F) -> Accumulate<Self, F>
    where
        F: Fn(Self::Item, Self::Item) -> Self::Item,
        Self::Item: Copy,
        Self: Sized,
        Self: Iterator,
    {
        Accumulate {
            accum: None,
            underlying: self,
            acc_fn: f,
        }
    }
fn accumulate < F > ( self , f : F ) -> Accumulate < Self , F > where F : Fn ( Self :: Item , Self :: Item ) -> Self :: Item , Self :: Item : Copy , Self : Sized , Self : Iterator , { Accumulate { accum : None , underlying : self , acc_fn : f , } }
An iterator adaptor that yields the computation of the closure `F` over the
accumulated value and the next element of the preceding iterator.
An iterator adaptor that yields the computation of the closure ` F ` over the accumulated value and the next element of the preceding iterator .
self
f
F
examples
Basic usage.

```
use rs3cache::utils::adapters::Accumulator.




Basic usage . ` ` ` use rs3cache :: utils :: adapters :: Accumulator .