summaryrefslogtreecommitdiff
path: root/sources/examples/iterators.scala
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2004-05-17 11:08:41 +0000
committermichelou <michelou@epfl.ch>2004-05-17 11:08:41 +0000
commit492ef8816734e44233eca1ffda19de5a4722832f (patch)
treebfc73e3f68671c28a2849100c25b309625a8744d /sources/examples/iterators.scala
parentc2dfcba32874d323e95065e76f13ca0e0b05dfb8 (diff)
downloadscala-492ef8816734e44233eca1ffda19de5a4722832f.tar.gz
scala-492ef8816734e44233eca1ffda19de5a4722832f.tar.bz2
scala-492ef8816734e44233eca1ffda19de5a4722832f.zip
- replaced 'System.out' with 'Console'.
Diffstat (limited to 'sources/examples/iterators.scala')
-rw-r--r--sources/examples/iterators.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/sources/examples/iterators.scala b/sources/examples/iterators.scala
index 3f2ddbb0be..75ef1ed619 100644
--- a/sources/examples/iterators.scala
+++ b/sources/examples/iterators.scala
@@ -3,7 +3,7 @@ package examples;
object iterators {
def printArray(xs: Array[Double]) =
- Iterator.fromArray(xs) foreach (x => System.out.println(x));
+ Iterator.fromArray(xs) foreach { x => Console.println(x) };
def findGreater(xs: Array[Double], limit: Double) =
Iterator.fromArray(xs)
@@ -15,7 +15,8 @@ object iterators {
val ar = Array[Double](6, 2, 8, 5, 1);
printArray(ar);
Console.println("Elements greater than 3.0:");
- findGreater(ar, 3.0) foreach { x => Console.println(ar(x)); }
+ findGreater(ar, 3.0) foreach { x => Console.println(ar(x)) }
}
}
+