From 466ef4d1215d9274f70d83a06a9f87a58b778435 Mon Sep 17 00:00:00 2001 From: Matthias Zenger Date: Tue, 10 Feb 2004 21:49:50 +0000 Subject: - Adapted examples to the new syntax. --- sources/examples/maps.scala | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sources/examples/maps.scala') 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) || -- cgit v1.2.3