diff options
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/iter.rs | 3 | ||||
| -rw-r--r-- | src/libcore/vec.rs | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index f94c62d23ec..58a514dc0ee 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -284,7 +284,8 @@ pub fn build_sized_opt<A,B: Buildable<A>>(size: Option<uint>, // Functions that combine iteration and building -/// Applies a function to each element of an iterable and returns the results. +/// Applies a function to each element of an iterable and returns the results +/// in a sequence built via `BU`. See also `map_to_vec`. #[inline(always)] pub fn map<T,IT: BaseIter<T>,U,BU: Buildable<U>>(v: &IT, f: &fn(&T) -> U) -> BU { diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs index 9def28fd3aa..5c976756d13 100644 --- a/src/libcore/vec.rs +++ b/src/libcore/vec.rs @@ -172,12 +172,12 @@ pub fn with_capacity<T>(capacity: uint) -> ~[T] { /** * Builds a vector by calling a provided function with an argument * function that pushes an element to the back of a vector. - * This version takes an initial size for the vector. + * This version takes an initial capacity for the vector. * * # Arguments * * * size - An initial size of the vector to reserve - * * builder - A function that will construct the vector. It recieves + * * builder - A function that will construct the vector. It receives * as an argument a function that will push an element * onto the vector being constructed. */ @@ -194,7 +194,7 @@ pub fn build_sized<A>(size: uint, builder: &fn(push: &fn(v: A))) -> ~[A] { * * # Arguments * - * * builder - A function that will construct the vector. It recieves + * * builder - A function that will construct the vector. It receives * as an argument a function that will push an element * onto the vector being constructed. */ |
