/// Sums the elements of a stream.
/// Takes each element, adds them together, and returns the result.
/// An empty stream returns the zero value of the type.
///
/// # Examples
///
/// ```
/// use asyncplify::*;
/// let vec = (0..10)
///     .into_stream()
///     .sum()
///     .into_vec();
///
/// assert!(vec == [45], "vec = {:?}", vec);
/// ```
Sums the elements of a stream.
Takes each element, adds them together, and returns the result.
An empty stream returns the zero value of the type.
Sums the elements of a stream . Takes each element adds them together and returns the result . An empty stream returns the zero value of the type .
fn sum(self) -> Sum<Self>
        where Self: Sized
    {
        Sum::new(self)
    }
fn sum ( self ) -> Sum < Self > where Self : Sized { Sum :: new ( self ) }
Sums the elements of a stream.
Sums the elements of a stream .
self
examples
None