Skip to content

Commit b461287

Browse files
TupleCombinations::fold
1 parent b5869ed commit b461287

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/adaptors/mod.rs

+7
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,13 @@ where
634634
fn count(self) -> usize {
635635
self.iter.count()
636636
}
637+
638+
fn fold<B, F>(self, init: B, f: F) -> B
639+
where
640+
F: FnMut(B, Self::Item) -> B,
641+
{
642+
self.iter.fold(init, f)
643+
}
637644
}
638645

639646
impl<I, T> FusedIterator for TupleCombinations<I, T>

0 commit comments

Comments
 (0)