diff options
author | Rex Kerr <ichoran@gmail.com> | 2014-11-23 13:30:03 -0800 |
---|---|---|
committer | Rex Kerr <ichoran@gmail.com> | 2014-11-26 13:00:22 -0800 |
commit | 6553ccc58ee2ca87249ca0b62ef8aea9ed8952f2 (patch) | |
tree | 76eb811fac15129f581743a012a73fa4ca69c340 /src/library/scala/collection/LinearSeqLike.scala | |
parent | c4df20d29a8d15ef23cf0d10fad56da0791bbbf6 (diff) | |
download | scala-6553ccc58ee2ca87249ca0b62ef8aea9ed8952f2.tar.gz scala-6553ccc58ee2ca87249ca0b62ef8aea9ed8952f2.tar.bz2 scala-6553ccc58ee2ca87249ca0b62ef8aea9ed8952f2.zip |
SI-8754 linear seqs aren't
LinearSeqLike still isn't exactly linear (LinearSeqOptimized is), but at least the docs now give reasonably correct information about what is actually going on.
Diffstat (limited to 'src/library/scala/collection/LinearSeqLike.scala')
-rw-r--r-- | src/library/scala/collection/LinearSeqLike.scala | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/library/scala/collection/LinearSeqLike.scala b/src/library/scala/collection/LinearSeqLike.scala index ff7985bf0d..3288599221 100644 --- a/src/library/scala/collection/LinearSeqLike.scala +++ b/src/library/scala/collection/LinearSeqLike.scala @@ -14,22 +14,10 @@ import scala.annotation.tailrec /** A template trait for linear sequences of type `LinearSeq[A]`. * - * $linearSeqInfo - * - * This trait just implements `iterator` in terms of `isEmpty, ``head`, and `tail`. - * However, see `LinearSeqOptimized` for an implementation trait that overrides operations + * This trait just implements `iterator` and `corresponds` in terms of `isEmpty, ``head`, and `tail`. + * However, see `LinearSeqOptimized` for an implementation trait that overrides many more operations * to make them run faster under the assumption of fast linear access with `head` and `tail`. * - * @define linearSeqInfo - * Linear sequences are defined in terms of three abstract methods, which are assumed - * to have efficient implementations. These are: - * {{{ - * def isEmpty: Boolean - * def head: A - * def tail: Repr - * }}} - * Here, `A` is the type of the sequence elements and `Repr` is the type of the sequence itself. - * * Linear sequences do not add any new methods to `Seq`, but promise efficient implementations * of linear access patterns. * @author Martin Odersky |