Sat, 19 Oct 2024 10:39:54 -0500
Add Sum::iter
src/mapping.rs | file | annotate | diff | comparison | revisions |
--- a/src/mapping.rs Tue Feb 20 12:34:17 2024 -0500 +++ b/src/mapping.rs Sat Oct 19 10:39:54 2024 -0500 @@ -110,6 +110,11 @@ pub fn new<I : Iterator<Item = M>>(iter : I) -> Self { Sum { components : iter.collect(), _domain : PhantomData } } + + /// Iterate over the component functions of the sum + pub fn iter(&self) -> std::slice::Iter<'_, M> { + self.components.iter() + } }