Skip to content

Commit 4519f82

Browse files
author
Olivier Saut
committed
Various typos corrected
1 parent e1a4e66 commit 4519f82

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/libcore/iter.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pub trait CopyableNonstrictIter<A:Copy> {
6969
pure fn each_val(&const self, f: &fn(A) -> bool);
7070
}
7171

72-
// A trait for sequences that can be by imperatively pushing elements
72+
// A trait for sequences that can be built by imperatively pushing elements
7373
// onto them.
7474
pub trait Buildable<A> {
7575
/**
@@ -198,7 +198,7 @@ pub pure fn position<A,IA:BaseIter<A>>(self: &IA, f: fn(&A) -> bool)
198198
}
199199

200200
// note: 'rposition' would only make sense to provide with a bidirectional
201-
// iter interface, such as would provide "reach" in addition to "each". as is,
201+
// iter interface, such as would provide "reach" in addition to "each". As is,
202202
// it would have to be implemented with foldr, which is too inefficient.
203203

204204
#[inline(always)]
@@ -269,13 +269,13 @@ pub pure fn build<A,B: Buildable<A>>(builder: fn(push: pure fn(A)))
269269

270270
/**
271271
* Builds a sequence by calling a provided function with an argument
272-
* function that pushes an element to the back of a sequence.
272+
* function that pushes an element to the back of the sequence.
273273
* This version takes an initial size for the sequence.
274274
*
275275
* # Arguments
276276
*
277277
* * size - An option, maybe containing initial size of the sequence
278-
* to reserve
278+
* to reserve.
279279
* * builder - A function that will construct the sequence. It receives
280280
* as an argument a function that will push an element
281281
* onto the sequence being constructed.
@@ -290,7 +290,7 @@ pub pure fn build_sized_opt<A,B: Buildable<A>>(
290290

291291
// Functions that combine iteration and building
292292

293-
/// Apply a function to each element of an iterable and return the results
293+
/// Applies a function to each element of an iterable and returns the results.
294294
#[inline(always)]
295295
pub fn map<T,IT: BaseIter<T>,U,BU: Buildable<U>>(v: &IT, f: fn(&T) -> U)
296296
-> BU {
@@ -302,7 +302,7 @@ pub fn map<T,IT: BaseIter<T>,U,BU: Buildable<U>>(v: &IT, f: fn(&T) -> U)
302302
}
303303

304304
/**
305-
* Creates and initializes a generic sequence from a function
305+
* Creates and initializes a generic sequence from a function.
306306
*
307307
* Creates a generic sequence of size `n_elts` and initializes the elements
308308
* to the value returned by the function `op`.
@@ -317,7 +317,7 @@ pub pure fn from_fn<T,BT: Buildable<T>>(n_elts: uint,
317317
}
318318

319319
/**
320-
* Creates and initializes a generic sequence with some element
320+
* Creates and initializes a generic sequence with some elements.
321321
*
322322
* Creates an immutable vector of size `n_elts` and initializes the elements
323323
* to the value `t`.
@@ -331,7 +331,7 @@ pub pure fn from_elem<T:Copy,BT:Buildable<T>>(n_elts: uint,
331331
}
332332
}
333333

334-
/// Appending two generic sequences
334+
/// Appends two generic sequences.
335335
#[inline(always)]
336336
pub pure fn append<T:Copy,IT:BaseIter<T>,BT:Buildable<T>>(
337337
lhs: &IT, rhs: &IT) -> BT {

0 commit comments

Comments
 (0)