diff options
author | Martin Odersky <odersky@gmail.com> | 2003-06-24 16:42:49 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2003-06-24 16:42:49 +0000 |
commit | 9114fea991c7960ce9a53cbd45cb3dcc72980898 (patch) | |
tree | 3270e0b513b6a610320d412e36a01343877de193 /test/files/run/Course-2002-05.scala | |
parent | a424426552bd2f25b76765f4f03cff92ee048fe9 (diff) | |
download | scala-9114fea991c7960ce9a53cbd45cb3dcc72980898.tar.gz scala-9114fea991c7960ce9a53cbd45cb3dcc72980898.tar.bz2 scala-9114fea991c7960ce9a53cbd45cb3dcc72980898.zip |
*** empty log message ***
Diffstat (limited to 'test/files/run/Course-2002-05.scala')
-rw-r--r-- | test/files/run/Course-2002-05.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/files/run/Course-2002-05.scala b/test/files/run/Course-2002-05.scala index bc5e98592d..2d8a146624 100644 --- a/test/files/run/Course-2002-05.scala +++ b/test/files/run/Course-2002-05.scala @@ -3,7 +3,7 @@ //############################################################################ // $Id$ -module M0 { +object M0 { def partition[a](xs: List[a], pred: a => boolean): Pair[List[a], List[a]] = { if (xs.isEmpty) Pair(List(),List()) @@ -49,7 +49,7 @@ module M0 { //############################################################################ -module M1 { +object M1 { def partition[a](xs: List[a], pred: a => boolean): Pair[List[a], List[a]] = { xs.foldRight[Pair[List[a], List[a]]](Pair(List(), List())) { (x, p) => if (pred (x)) Pair(x :: p._1, p._2) else Pair(p._1, x :: p._2) @@ -89,7 +89,7 @@ module M1 { //############################################################################ -module M2 { +object M2 { def powerset[a] (s : List[a]) : List[List[a]] = { if (s.isEmpty) @@ -113,7 +113,7 @@ module M2 { //############################################################################ -module M3 { +object M3 { type Placement = List[Pair[int,int]]; @@ -156,7 +156,7 @@ module M3 { //############################################################################ -module Test { +object Test { def main(args: Array[String]): unit = { M0.test; M1.test; |