fastnum2 0.3.6

fork of Fast decimal numbers library
Documentation
1
2
3
4
5
6
7
8
9
10
use core::iter::Sum;

use crate::decimal::UnsignedDecimal;

impl<const N: usize> Sum for UnsignedDecimal<N> {
    #[inline]
    fn sum<I: Iterator<Item = UnsignedDecimal<N>>>(iter: I) -> UnsignedDecimal<N> {
        iter.fold(UnsignedDecimal::<N>::ZERO, |a, b| a + b)
    }
}