@@ -110,8 +110,8 @@ pub trait Iterator<A> {
110
110
#[ unstable = "new convention for extension traits" ]
111
111
/// An extension trait providing numerous methods applicable to all iterators.
112
112
pub trait IteratorExt < A > : Iterator < A > {
113
- /// Chain this iterator with another, returning a new iterator which will
114
- /// finish iterating over the current iterator, and then it will iterate
113
+ /// Chain this iterator with another, returning a new iterator that will
114
+ /// finish iterating over the current iterator, and then iterate
115
115
/// over the other specified iterator.
116
116
///
117
117
/// # Example
@@ -130,7 +130,7 @@ pub trait IteratorExt<A>: Iterator<A> {
130
130
Chain { a : self , b : other, flag : false }
131
131
}
132
132
133
- /// Creates an iterator which iterates over both this and the specified
133
+ /// Creates an iterator that iterates over both this and the specified
134
134
/// iterators simultaneously, yielding the two elements as pairs. When
135
135
/// either iterator returns None, all further invocations of next() will
136
136
/// return None.
@@ -151,7 +151,7 @@ pub trait IteratorExt<A>: Iterator<A> {
151
151
Zip { a : self , b : other}
152
152
}
153
153
154
- /// Creates a new iterator which will apply the specified function to each
154
+ /// Creates a new iterator that will apply the specified function to each
155
155
/// element returned by the first, yielding the mapped element instead.
156
156
///
157
157
/// # Example
@@ -169,8 +169,8 @@ pub trait IteratorExt<A>: Iterator<A> {
169
169
Map { iter : self , f : f}
170
170
}
171
171
172
- /// Creates an iterator which applies the predicate to each element returned
173
- /// by this iterator. Only elements which have the predicate evaluate to
172
+ /// Creates an iterator that applies the predicate to each element returned
173
+ /// by this iterator. Only elements that have the predicate evaluate to
174
174
/// `true` will be yielded.
175
175
///
176
176
/// # Example
@@ -187,7 +187,7 @@ pub trait IteratorExt<A>: Iterator<A> {
187
187
Filter { iter : self , predicate : predicate}
188
188
}
189
189
190
- /// Creates an iterator which both filters and maps elements.
190
+ /// Creates an iterator that both filters and maps elements.
191
191
/// If the specified function returns None, the element is skipped.
192
192
/// Otherwise the option is unwrapped and the new value is yielded.
193
193
///
@@ -205,7 +205,7 @@ pub trait IteratorExt<A>: Iterator<A> {
205
205
FilterMap { iter : self , f : f }
206
206
}
207
207
208
- /// Creates an iterator which yields a pair of the value returned by this
208
+ /// Creates an iterator that yields a pair of the value returned by this
209
209
/// iterator plus the current index of iteration.
210
210
///
211
211
/// # Example
@@ -248,7 +248,7 @@ pub trait IteratorExt<A>: Iterator<A> {
248
248
Peekable { iter : self , peeked : None }
249
249
}
250
250
251
- /// Creates an iterator which invokes the predicate on elements until it
251
+ /// Creates an iterator that invokes the predicate on elements until it
252
252
/// returns false. Once the predicate returns false, all further elements are
253
253
/// yielded.
254
254
///
@@ -268,7 +268,7 @@ pub trait IteratorExt<A>: Iterator<A> {
268
268
SkipWhile { iter : self , flag : false , predicate : predicate}
269
269
}
270
270
271
- /// Creates an iterator which yields elements so long as the predicate
271
+ /// Creates an iterator that yields elements so long as the predicate
272
272
/// returns true. After the predicate returns false for the first time, no
273
273
/// further elements will be yielded.
274
274
///
@@ -287,8 +287,8 @@ pub trait IteratorExt<A>: Iterator<A> {
287
287
TakeWhile { iter : self , flag : false , predicate : predicate}
288
288
}
289
289
290
- /// Creates an iterator which skips the first `n` elements of this iterator,
291
- /// and then it yields all further items.
290
+ /// Creates an iterator that skips the first `n` elements of this iterator,
291
+ /// and then yields all further items.
292
292
///
293
293
/// # Example
294
294
///
@@ -305,8 +305,8 @@ pub trait IteratorExt<A>: Iterator<A> {
305
305
Skip { iter : self , n : n}
306
306
}
307
307
308
- /// Creates an iterator which yields the first `n` elements of this
309
- /// iterator, and then it will always return None.
308
+ /// Creates an iterator that yields the first `n` elements of this
309
+ /// iterator, and then will always return None.
310
310
///
311
311
/// # Example
312
312
///
@@ -324,7 +324,7 @@ pub trait IteratorExt<A>: Iterator<A> {
324
324
Take { iter : self , n : n}
325
325
}
326
326
327
- /// Creates a new iterator which behaves in a similar fashion to fold.
327
+ /// Creates a new iterator that behaves in a similar fashion to fold.
328
328
/// There is a state which is passed between each iteration and can be
329
329
/// mutated as necessary. The yielded values from the closure are yielded
330
330
/// from the Scan instance when not None.
@@ -1223,7 +1223,7 @@ impl<A, T: Clone + RandomAccessIterator<A>> RandomAccessIterator<A> for Cycle<T>
1223
1223
}
1224
1224
}
1225
1225
1226
- /// An iterator which strings two iterators together
1226
+ /// An iterator that strings two iterators together
1227
1227
#[ deriving( Clone ) ]
1228
1228
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1229
1229
#[ stable]
@@ -1297,7 +1297,7 @@ for Chain<T, U> {
1297
1297
}
1298
1298
}
1299
1299
1300
- /// An iterator which iterates two other iterators simultaneously
1300
+ /// An iterator that iterates two other iterators simultaneously
1301
1301
#[ deriving( Clone ) ]
1302
1302
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1303
1303
#[ stable]
@@ -1380,7 +1380,7 @@ RandomAccessIterator<(A, B)> for Zip<T, U> {
1380
1380
}
1381
1381
}
1382
1382
1383
- /// An iterator which maps the values of `iter` with `f`
1383
+ /// An iterator that maps the values of `iter` with `f`
1384
1384
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1385
1385
#[ stable]
1386
1386
pub struct Map < A , B , I : Iterator < A > , F : FnMut ( A ) -> B > {
@@ -1441,7 +1441,7 @@ impl<A, B, I, F> RandomAccessIterator<B> for Map<A, B, I, F> where
1441
1441
}
1442
1442
}
1443
1443
1444
- /// An iterator which filters the elements of `iter` with `predicate`
1444
+ /// An iterator that filters the elements of `iter` with `predicate`
1445
1445
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1446
1446
#[ stable]
1447
1447
pub struct Filter < A , I , P > where I : Iterator < A > , P : FnMut ( & A ) -> bool {
@@ -1486,7 +1486,7 @@ impl<A, I, P> DoubleEndedIterator<A> for Filter<A, I, P> where
1486
1486
}
1487
1487
}
1488
1488
1489
- /// An iterator which uses `f` to both filter and map elements from `iter`
1489
+ /// An iterator that uses `f` to both filter and map elements from `iter`
1490
1490
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1491
1491
#[ stable]
1492
1492
pub struct FilterMap < A , B , I , F > where I : Iterator < A > , F : FnMut ( A ) -> Option < B > {
@@ -1534,7 +1534,7 @@ impl<A, B, I, F> DoubleEndedIterator<B> for FilterMap<A, B, I, F> where
1534
1534
}
1535
1535
}
1536
1536
1537
- /// An iterator which yields the current count and the element during iteration
1537
+ /// An iterator that yields the current count and the element during iteration
1538
1538
#[ deriving( Clone ) ]
1539
1539
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1540
1540
#[ stable]
@@ -1648,7 +1648,7 @@ impl<'a, A, T: Iterator<A>> Peekable<A, T> {
1648
1648
}
1649
1649
}
1650
1650
1651
- /// An iterator which rejects elements while `predicate` is true
1651
+ /// An iterator that rejects elements while `predicate` is true
1652
1652
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1653
1653
#[ stable]
1654
1654
pub struct SkipWhile < A , I , P > where I : Iterator < A > , P : FnMut ( & A ) -> bool {
@@ -1677,7 +1677,7 @@ impl<A, I, P> Iterator<A> for SkipWhile<A, I, P> where I: Iterator<A>, P: FnMut(
1677
1677
}
1678
1678
}
1679
1679
1680
- /// An iterator which only accepts elements while `predicate` is true
1680
+ /// An iterator that only accepts elements while `predicate` is true
1681
1681
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1682
1682
#[ stable]
1683
1683
pub struct TakeWhile < A , I , P > where I : Iterator < A > , P : FnMut ( & A ) -> bool {
@@ -1714,7 +1714,7 @@ impl<A, I, P> Iterator<A> for TakeWhile<A, I, P> where I: Iterator<A>, P: FnMut(
1714
1714
}
1715
1715
}
1716
1716
1717
- /// An iterator which skips over `n` elements of `iter`.
1717
+ /// An iterator that skips over `n` elements of `iter`.
1718
1718
#[ deriving( Clone ) ]
1719
1719
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1720
1720
#[ stable]
@@ -1782,7 +1782,7 @@ impl<A, T: RandomAccessIterator<A>> RandomAccessIterator<A> for Skip<T> {
1782
1782
}
1783
1783
}
1784
1784
1785
- /// An iterator which only iterates over the first `n` iterations of `iter`.
1785
+ /// An iterator that only iterates over the first `n` iterations of `iter`.
1786
1786
#[ deriving( Clone ) ]
1787
1787
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1788
1788
#[ stable]
@@ -2075,7 +2075,7 @@ impl<A, I, F> RandomAccessIterator<A> for Inspect<A, I, F> where
2075
2075
}
2076
2076
}
2077
2077
2078
- /// An iterator which passes mutable state to a closure and yields the result.
2078
+ /// An iterator that passes mutable state to a closure and yields the result.
2079
2079
///
2080
2080
/// # Example: The Fibonacci Sequence
2081
2081
///
0 commit comments