summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-11-26 22:29:12 +0000
committerPaul Phillips <paulp@improving.org>2009-11-26 22:29:12 +0000
commit0635b1a3d8e2f3f18184d554b03f1e5614c0c5a9 (patch)
tree96b28dabd006ca766d26e17218686b8509a05821 /src/library
parent3f03586ba49ae4a9d447af42001dad3f63f7ee52 (diff)
downloadscala-0635b1a3d8e2f3f18184d554b03f1e5614c0c5a9.tar.gz
scala-0635b1a3d8e2f3f18184d554b03f1e5614c0c5a9.tar.bz2
scala-0635b1a3d8e2f3f18184d554b03f1e5614c0c5a9.zip
Following up on my deprecated method overreach.
trunk contains all the deprecated methods it should.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/Either.scala32
-rw-r--r--src/library/scala/collection/TraversableLike.scala9
-rw-r--r--src/library/scala/collection/immutable/List.scala3
3 files changed, 3 insertions, 41 deletions
diff --git a/src/library/scala/Either.scala b/src/library/scala/Either.scala
index cc84685287..e456dab2dd 100644
--- a/src/library/scala/Either.scala
+++ b/src/library/scala/Either.scala
@@ -328,38 +328,6 @@ object Either {
case Right(t) => t
}
- /**
- * Returns the <code>Left</code> values in the given <code>Iterable</code> of <code>Either</code>s.
- */
- @deprecated("use `for (Left(a) <- es) yield a'")
- def lefts[A, B](es: Iterable[Either[A, B]]) =
- es.foldRight[List[A]](Nil)((e, as) => e match {
- case Left(a) => a :: as
- case Right(_) => as
- })
-
- /**
- * Returns the <code>Right</code> values in the given<code>Iterable</code> of <code>Either</code>s.
- */
- @deprecated("use `for (Right(a) <- es) yield a'")
- def rights[A, B](es: Iterable[Either[A, B]]) =
- es.foldRight[List[B]](Nil)((e, bs) => e match {
- case Left(_) => bs
- case Right(b) => b :: bs
- })
-
- /** Transforms an Iterable of Eithers into a pair of lists.
- *
- * @param xs the iterable of Eithers to separate
- * @return a pair of lists.
- */
- @deprecated("use `for ((Left(l), Right(r)) <- es partition isLeft) yield (l, r)'")
- def separate[A,B](es: Iterable[Either[A,B]]): (List[A], List[B]) =
- es.foldRight[(List[A], List[B])]((Nil, Nil)) {
- case (Left(a), (lefts, rights)) => (a :: lefts, rights)
- case (Right(b), (lefts, rights)) => (lefts, b :: rights)
- }
-
/** If the condition satisfies, return the given A in <code>Left</code>,
* otherwise, return the given B in <code>Right</code>.
*/
diff --git a/src/library/scala/collection/TraversableLike.scala b/src/library/scala/collection/TraversableLike.scala
index b06eecc104..57ae2adabe 100644
--- a/src/library/scala/collection/TraversableLike.scala
+++ b/src/library/scala/collection/TraversableLike.scala
@@ -203,15 +203,6 @@ self =>
b.result
}
- /** Returns a traversable with all elements of this traversable which do not satisfy the predicate
- * <code>p</code>.
- *
- * @param p the predicate used to test elements
- * @return the traversable without all elements that satisfy <code>p</code>
- */
- @deprecated("use `filterNot' instead")
- def remove(p: A => Boolean): Repr = filterNot(p)
-
/** Partitions this traversable in two traversables according to a predicate.
*
* @param p the predicate on which to partition
diff --git a/src/library/scala/collection/immutable/List.scala b/src/library/scala/collection/immutable/List.scala
index 9aa27aae5f..4e29fb8f96 100644
--- a/src/library/scala/collection/immutable/List.scala
+++ b/src/library/scala/collection/immutable/List.scala
@@ -305,6 +305,9 @@ sealed abstract class List[+A] extends LinearSeq[A]
@deprecated("use `span { x => !p(x) }` instead")
def break(p: A => Boolean): (List[A], List[A]) = span { x => !p(x) }
+ @deprecated("use `filterNot' instead")
+ def remove(p: A => Boolean): List[A] = filterNot(p)
+
/** Computes the difference between this list and the given list
* <code>that</code>.
*