summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2004-05-07 14:58:32 +0000
committermichelou <michelou@epfl.ch>2004-05-07 14:58:32 +0000
commit5fef5ac208be466ffb260bfee6c89835a07584da (patch)
treee8e8a863e67736c038ebbc9c6ce394764ca9b6f6 /sources
parent9711cb5539092c237801a0e600957ae3934bb938 (diff)
downloadscala-5fef5ac208be466ffb260bfee6c89835a07584da.tar.gz
scala-5fef5ac208be466ffb260bfee6c89835a07584da.tar.bz2
scala-5fef5ac208be466ffb260bfee6c89835a07584da.zip
- corrected wrong start value of function 'from'.
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/Iterator.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/scala/Iterator.scala b/sources/scala/Iterator.scala
index d4e76939a9..3472f1f436 100644
--- a/sources/scala/Iterator.scala
+++ b/sources/scala/Iterator.scala
@@ -110,7 +110,7 @@ object Iterator {
* @return the iterator starting at value <code>lo</code>.
*/
def from(lo: Int, step: Int) = new Iterator[Int] {
- private var i = 0;
+ private var i = lo;
def hasNext: Boolean = true;
def next: Int = { val j = i; i = i + step; j }
}
@@ -124,7 +124,7 @@ object Iterator {
* @return the iterator starting at value <code>lo</code>.
*/
def from(lo: Int, step: Int => Int) = new Iterator[Int] {
- private var i = 0;
+ private var i = lo;
def hasNext: Boolean = true;
def next: Int = { val j = i; i = step(i); j }
}