trait
LinearSeq
[
+A
]
extends
Seq
with
LinearSeqLike
Base trait for linearly accessed sequences that have efficient head
and
tail
operations.
Known subclasses: List, LazyList
Constructors
Members
override
def
apply
(
n:
Int
)
: A
apply
is defined in terms of drop
, which is in turn defined in
terms of tail
.
apply
is defined in terms of drop
, which is in turn defined in
terms of tail
.
def
head
: A
The first element of the collection.
The first element of the collection.
def
isEmpty
: Boolean
To be overridden in implementations:
To be overridden in implementations:
def
iterator
: Iterator
[
A
]
iterator
is overridden in terms of head
and tail
iterator
is overridden in terms of head
and tail
def
length
: Int
length is defined in terms of
iterator`
length is defined in terms of
iterator`
def
tail
: LinearSeq
[
A
]
The rest of the collection without its first element.
The rest of the collection without its first element.