We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efa3320 commit 9cee79aCopy full SHA for 9cee79a
src/libcore/iter/sources.rs
@@ -158,6 +158,12 @@ unsafe impl<A, F: FnMut() -> A> TrustedLen for RepeatWith<F> {}
158
///
159
/// [`repeat`]: fn.repeat.html
160
161
+/// An iterator produced by `repeat_with()` is a `DoubleEndedIterator`.
162
+/// It is important to not that reversing `repeat_with(f)` will produce
163
+/// the exact same sequence as the non-reversed iterator. In other words,
164
+/// `repeat_with(f).rev().collect::<Vec<_>>()` is equivalent to
165
+/// `repeat_with(f).collect::<Vec<_>>()`.
166
+///
167
/// # Examples
168
169
/// Basic usage:
0 commit comments