diff options
Diffstat (limited to 'src/library/scala/collection/SeqLike.scala')
-rw-r--r-- | src/library/scala/collection/SeqLike.scala | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/library/scala/collection/SeqLike.scala b/src/library/scala/collection/SeqLike.scala index b775480532..2d662257e5 100644 --- a/src/library/scala/collection/SeqLike.scala +++ b/src/library/scala/collection/SeqLike.scala @@ -9,11 +9,10 @@ package scala package collection -import mutable.{ ListBuffer, ArraySeq } import immutable.{ List, Range } import generic._ import parallel.ParSeq -import scala.math.{ min, max, Ordering } +import scala.math.Ordering /** A template trait for sequences of type `Seq[A]` * $seqInfo @@ -114,7 +113,7 @@ trait SeqLike[+A, +Repr] extends Any with IterableLike[A, Repr] with GenSeqLike[ } def indexWhere(p: A => Boolean, from: Int): Int = { - var i = from + var i = from max 0 val it = iterator.drop(from) while (it.hasNext) { if (p(it.next())) return i @@ -146,7 +145,7 @@ trait SeqLike[+A, +Repr] extends Any with IterableLike[A, Repr] with GenSeqLike[ * more than one way to generate the same subsequence, only one will be returned. * * For example, `"xyyy"` has three different ways to generate `"xy"` depending on - * whether the first, second, or third `"y"` is selected. However, since all are + * whether the first, second, or third `"y"` is selected. However, since all are * identical, only one will be chosen. Which of the three will be taken is an * implementation detail that is not defined. * |