From 0c9d5eb8c32c210e69c19b587889c2f078f67efa Mon Sep 17 00:00:00 2001 From: paltherr Date: Wed, 9 Apr 2003 15:52:01 +0000 Subject: - Replaced foldr by foldRight --- test/files/run/Course-2002-05.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/files/run/Course-2002-05.scala') diff --git a/test/files/run/Course-2002-05.scala b/test/files/run/Course-2002-05.scala index 9f3304f690..bc5e98592d 100644 --- a/test/files/run/Course-2002-05.scala +++ b/test/files/run/Course-2002-05.scala @@ -51,7 +51,7 @@ module M0 { module M1 { def partition[a](xs: List[a], pred: a => boolean): Pair[List[a], List[a]] = { - xs.foldr[Pair[List[a], List[a]]](Pair(List(), List())) { + 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) } } -- cgit v1.2.3