diff options
author | Matthias Zenger <mzenger@gmail.com> | 2004-02-10 21:49:50 +0000 |
---|---|---|
committer | Matthias Zenger <mzenger@gmail.com> | 2004-02-10 21:49:50 +0000 |
commit | 466ef4d1215d9274f70d83a06a9f87a58b778435 (patch) | |
tree | b48f08ceb0d3f65cfcedebc7d44569eeb94e133a /sources/examples/maps.scala | |
parent | 3a657c3f268dbbb33925c270d9b7cc9b19ac0290 (diff) | |
download | scala-466ef4d1215d9274f70d83a06a9f87a58b778435.tar.gz scala-466ef4d1215d9274f70d83a06a9f87a58b778435.tar.bz2 scala-466ef4d1215d9274f70d83a06a9f87a58b778435.zip |
- Adapted examples to the new syntax.
Diffstat (limited to 'sources/examples/maps.scala')
-rw-r--r-- | sources/examples/maps.scala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sources/examples/maps.scala b/sources/examples/maps.scala index a5b2348f95..0defd89a81 100644 --- a/sources/examples/maps.scala +++ b/sources/examples/maps.scala @@ -21,7 +21,7 @@ object maps { val empty: AlgMap = Empty(); private case class - Empty() extends AlgMap {}, + Empty(), Node(key: kt, value: vt, l: map, r: map) extends AlgMap {} trait AlgMap extends Map { @@ -111,7 +111,7 @@ object maps { class MutMap(key: kt, value: vt) extends Map { val k = key; var v = value; - var l = empty, r = empty; + var l, r = empty; def apply(key: kt): vt = if (this == empty) null @@ -152,7 +152,9 @@ object maps { } class Date(y: Int, m: Int, d: Int) with Ord[Date] { - def year = y, month = m, day = d; + def year = y; + def month = m; + def day = d; def <(that: Date): Boolean = { (year < that.year) || |