diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/collection/immutable/Stream.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/library/scala/collection/immutable/Stream.scala b/src/library/scala/collection/immutable/Stream.scala index 7e363a7e96..9ad7a49e2a 100644 --- a/src/library/scala/collection/immutable/Stream.scala +++ b/src/library/scala/collection/immutable/Stream.scala @@ -344,6 +344,8 @@ self => if (n <= 0 || isEmpty) Stream.Empty else new Stream.Cons(head, if (n == 1) Stream.empty else tail take (n-1)) + override def splitAt(n: Int): (Stream[A], Stream[A]) = (take(n), drop(n)) + /** A substream starting at index `from` * and extending up to (but not including) index `until`. * |