pub fn sum<T, F>(&self, f: F) -> T
	where
		T: Sum,
		F: Fn(&Unit) -> T,
	{
		self.iter().map(f).sum::<T>()
	}
/// Returns sum of given unit values.
Returns sum of given unit values.
Returns sum of given unit values .
pub fn sum<T, F>(&self, f: F) -> T
	where
		T: Sum,
		F: Fn(&Unit) -> T,
	{
		self.iter().map(f).sum::<T>()
	}
pub fn sum < T , F > ( & self , f : F ) -> T where T : Sum , F : Fn ( & Unit ) -> T , { self . iter ( ) . map ( f ) . sum :: < T > ( ) }
Returns sum of given unit values.
Returns sum of given unit values .
&self
f
F
&self
f
F