summaryrefslogtreecommitdiff
path: root/test/files/run/Course-2002-13.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-02-03 17:34:31 +0000
committerPaul Phillips <paulp@improving.org>2010-02-03 17:34:31 +0000
commit96a42a2eda85489bb7dba25d9e8597bd35d7bcbd (patch)
tree51e3848b5d994cdaee75c9faefead41bc9e729d0 /test/files/run/Course-2002-13.scala
parenta6eecfb04532c83a715d520e885250e8de808f9e (diff)
downloadscala-96a42a2eda85489bb7dba25d9e8597bd35d7bcbd.tar.gz
scala-96a42a2eda85489bb7dba25d9e8597bd35d7bcbd.tar.bz2
scala-96a42a2eda85489bb7dba25d9e8597bd35d7bcbd.zip
Striking while the iron is hot, renamed removeD...
Striking while the iron is hot, renamed removeDuplicates to unique and deprecated removeDuplicates. The debate between distinct and unique was vigorous but unique won by a freckle. (Dark horse 'nub' was disqualified for taking performance enhancers.) The only thing which might need review is the choice of name, but review by odersky.
Diffstat (limited to 'test/files/run/Course-2002-13.scala')
-rw-r--r--test/files/run/Course-2002-13.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/files/run/Course-2002-13.scala b/test/files/run/Course-2002-13.scala
index 27551b735b..fa5390e534 100644
--- a/test/files/run/Course-2002-13.scala
+++ b/test/files/run/Course-2002-13.scala
@@ -66,7 +66,7 @@ object Terms {
override def toString() =
a + (if (ts.isEmpty) "" else ts.mkString("(", ",", ")"));
def map(s: Subst): Term = Con(a, ts map (t => t map s));
- def tyvars = (ts flatMap (t => t.tyvars)).removeDuplicates;
+ def tyvars = (ts flatMap (t => t.tyvars)).unique;
}
private var count = 0;
@@ -113,7 +113,7 @@ object Programs {
case class Clause(lhs: Term, rhs: List[Term]) {
def tyvars =
- (lhs.tyvars ::: (rhs flatMap (t => t.tyvars))).removeDuplicates;
+ (lhs.tyvars ::: (rhs flatMap (t => t.tyvars))).unique;
def newInstance = {
var s: Subst = List();
for (val a <- tyvars) { s = Binding(a, newVar(a)) :: s }