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 2839805 commit 1f27512Copy full SHA for 1f27512
src/libstd/iter.rs
@@ -424,16 +424,13 @@ pub trait Iterator<A> {
424
ByRef{iter: self}
425
}
426
427
- /// An adaptation of an external iterator to the for-loop protocol of rust.
+ /// Apply a function to each element, or stop iterating if the
428
+ /// function returns `false`.
429
///
430
/// # Example
431
432
/// ```rust
- /// use std::iter::count;
433
- ///
434
- /// for i in count(0, 10) {
435
- /// println!("{}", i);
436
- /// }
+ /// range(0, 5).advance(|x| {print!("{} ", x); true});
437
/// ```
438
#[inline]
439
fn advance(&mut self, f: &fn(A) -> bool) -> bool {
0 commit comments