diff options
author | Paul Phillips <paulp@improving.org> | 2011-08-08 06:56:21 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-08-08 06:56:21 +0000 |
commit | 8b28292b5379a34fad0599335116b9e54ee44e20 (patch) | |
tree | 654c93a14a26e802948aa80664efb7aea7b448d3 /test/files/run/Course-2002-13.scala | |
parent | be31934db38a93468b6390e783ca377da6283c19 (diff) | |
download | scala-8b28292b5379a34fad0599335116b9e54ee44e20.tar.gz scala-8b28292b5379a34fad0599335116b9e54ee44e20.tar.bz2 scala-8b28292b5379a34fad0599335116b9e54ee44e20.zip |
Fixing all the tests and source which still use...
Fixing all the tests and source which still use the old for
comprehension syntax with vals where there are no vals and no vals where
there are vals. No review.
Diffstat (limited to 'test/files/run/Course-2002-13.scala')
-rw-r--r-- | test/files/run/Course-2002-13.scala | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/files/run/Course-2002-13.scala b/test/files/run/Course-2002-13.scala index c016d41a90..c266af8c32 100644 --- a/test/files/run/Course-2002-13.scala +++ b/test/files/run/Course-2002-13.scala @@ -116,7 +116,7 @@ object Programs { (lhs.tyvars ::: (rhs flatMap (t => t.tyvars))).distinct; def newInstance = { var s: Subst = List(); - for (val a <- tyvars) { s = Binding(a, newVar(a)) :: s } + for (a <- tyvars) { s = Binding(a, newVar(a)) :: s } Clause(lhs map s, rhs map (t => t map s)) } override def toString() = @@ -141,9 +141,9 @@ object Programs { if (solve1(qs, s).isEmpty) Stream.cons(s, Stream.empty) else Stream.empty case q :: query1 => - for (val clause <- list2stream(clauses); - val s1 <- tryClause(clause.newInstance, q, s); - val s2 <- solve1(query1, s1)) yield s2 + for (clause <- list2stream(clauses); + s1 <- tryClause(clause.newInstance, q, s); + s2 <- solve1(query1, s1)) yield s2 } def solve1(query: List[Term], s: Subst): Stream[Subst] = { @@ -154,8 +154,7 @@ object Programs { def tryClause(c: Clause, q: Term, s: Subst): Stream[Subst] = { if (debug) Console.println("trying " + c); - for (val s1 <- option2stream(unify(q, c.lhs, s)); - val s2 <- solve1(c.rhs, s1)) yield s2; + for (s1 <- option2stream(unify(q, c.lhs, s)); s2 <- solve1(c.rhs, s1)) yield s2; } solve1(query, List()) |