summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-11-26 22:09:33 +0000
committerPaul Phillips <paulp@improving.org>2009-11-26 22:09:33 +0000
commit3f03586ba49ae4a9d447af42001dad3f63f7ee52 (patch)
tree2d1a05f19ece92060905a2589d5b487c7a0dd4c7 /src/library
parent100112a580271b7408f11d06c187d6168f866160 (diff)
downloadscala-3f03586ba49ae4a9d447af42001dad3f63f7ee52.tar.gz
scala-3f03586ba49ae4a9d447af42001dad3f63f7ee52.tar.bz2
scala-3f03586ba49ae4a9d447af42001dad3f63f7ee52.zip
Closes #2707.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/collection/immutable/List.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/library/scala/collection/immutable/List.scala b/src/library/scala/collection/immutable/List.scala
index 0c43620465..9aa27aae5f 100644
--- a/src/library/scala/collection/immutable/List.scala
+++ b/src/library/scala/collection/immutable/List.scala
@@ -299,6 +299,12 @@ sealed abstract class List[+A] extends LinearSeq[A]
if (isEmpty) Stream.Empty
else new Stream.Cons(head, tail.toStream)
+
+ /** Like <code>span</code> but with the predicate inverted.
+ */
+ @deprecated("use `span { x => !p(x) }` instead")
+ def break(p: A => Boolean): (List[A], List[A]) = span { x => !p(x) }
+
/** Computes the difference between this list and the given list
* <code>that</code>.
*