diff options
author | Paul Phillips <paulp@improving.org> | 2010-04-06 01:26:31 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-04-06 01:26:31 +0000 |
commit | f578ff88d2514bf94c46cfb8c0e33236c2b2fcf1 (patch) | |
tree | 79de21d09f14420748c6426f50e7fc636ae7b33f /src/library/scala/collection/Iterator.scala | |
parent | 3b8ee6d4a95eb417b9e4eb944afb8d36bc913e18 (diff) | |
download | scala-f578ff88d2514bf94c46cfb8c0e33236c2b2fcf1.tar.gz scala-f578ff88d2514bf94c46cfb8c0e33236c2b2fcf1.tar.bz2 scala-f578ff88d2514bf94c46cfb8c0e33236c2b2fcf1.zip |
As a brief diversion from real work, implemente...
As a brief diversion from real work, implemented Damerau–Levenshtein
and ran it on trunk to elicit obvious misspellings. Unfortunately
they're mostly in places like compiler comments which real people never
see, but I fixed them anyway. All those English Lit majors who peruse
our sources are sure to be pleased. No review.
Diffstat (limited to 'src/library/scala/collection/Iterator.scala')
-rw-r--r-- | src/library/scala/collection/Iterator.scala | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/library/scala/collection/Iterator.scala b/src/library/scala/collection/Iterator.scala index a8e99836dc..701b24f300 100644 --- a/src/library/scala/collection/Iterator.scala +++ b/src/library/scala/collection/Iterator.scala @@ -135,7 +135,7 @@ object Iterator { } /** Creates an infinite-length iterator returning the results of evaluating - * an expression. The epxression is recomputed for every element. + * an expression. The expression is recomputed for every element. * * @param elem the element computation. * @return the iterator containing an infinite number of results of evaluating `elem`. @@ -254,7 +254,7 @@ object Iterator { def next(): Int = { val j = i; i = step(i); j } } - /** Create an iterator that is the concantenation of all iterators + /** Create an iterator that is the concatenation of all iterators * returned by a given iterator of iterators. * @param its The iterator which returns on each call to next * a new iterator whose elements are to be concatenated to the result. @@ -357,8 +357,8 @@ trait Iterator[+A] extends TraversableOnce[A] { /** Creates a new iterator that maps all produced values of this iterator * to new values using a transformation function. * @param f the transformation function - * @return a new iterator which transformes every value produced by this - * iterator by applying the functon `f` to it. + * @return a new iterator which transforms every value produced by this + * iterator by applying the function `f` to it. */ def map[B](f: A => B): Iterator[B] = new Iterator[B] { def hasNext = self.hasNext @@ -709,12 +709,12 @@ trait Iterator[+A] extends TraversableOnce[A] { if (found) i else -1 } - /** Returns the index of the first occurence of the specified + /** Returns the index of the first occurrence of the specified * object in this iterable object. * $mayNotTerminateInf * * @param elem element to search for. - * @return the index of the first occurence of `elem` in the values produced by this iterator, + * @return the index of the first occurrence of `elem` in the values produced by this iterator, * or -1 if such an element does not exist until the end of the iterator is reached. */ def indexOf[B >: A](elem: B): Int = { @@ -985,7 +985,7 @@ trait Iterator[+A] extends TraversableOnce[A] { } } - /** Tests if another iterator produces the same valeus as this one. + /** Tests if another iterator produces the same values as this one. * $willNotTerminateInf * @param that the other iterator * @return `true`, if both iterators produce the same elements in the same order, `false` otherwise. |