[use case] Returns a new sequence containing the elements from the left hand operand followed by the elements from the right hand operand.
def++:[B >: A, That](that: Traversable[B])(implicit bf: CanBuildFrom[Seq[A], B, That]): That
As with ++
, returns a new collection containing the elements from the left operand followed by the elements from the right operand.
[use case] As with ++
, returns a new collection containing the elements from the left operand followed by the elements from the right operand.
def+:(elem: A): Seq[A]
[use case] A copy of the sequence with an element prepended.
def/:[B](z: B)(op: (B, A) ⇒ B): B
Applies a binary operator to a start value and all elements of this sequence, going left to right.
def:+(elem: A): Seq[A]
[use case] A copy of this sequence with an element appended.
def:\[B](z: B)(op: (A, B) ⇒ B): B
Applies a binary operator to all elements of this sequence and a start value, going right to left.
Appends all elements of this sequence to a string builder.
Appends all elements of this sequence to a string builder using a separator string.
Appends all elements of this sequence to a string builder using start, end, and separator strings.
defaggregate[B](z: B)(seqop: (B, A) ⇒ B, combop: (B, B) ⇒ B): B
Aggregates the results of applying an operator to subsequent elements.
Composes this partial function with a transformation function that gets applied to results of this partial function.
defapplyOrElse[A1 <: Int, B1 >: A](x: A1, default: (A1) ⇒ B1): B1
Applies this partial function to the given argument when it is contained in the function domain.
defasParSeq: ParSeq[A]
defcanEqual(that: Any): Boolean
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
[use case] Builds a new collection by applying a partial function to all elements of this sequence on which the function is defined.
Finds the first element of the sequence for which the given partial function is defined, and applies the partial function to it.
Iterates over combinations.
The factory companion object that builds instances of class Seq
.
defcompose[A](g: (A) ⇒ Int): (A) ⇒ A
Composes two instances of Function1 in a new Function1, with this function applied last.
defcontains(elem: Any): Boolean
Tests whether this sequence contains a given value as an element.
defcontainsSlice[B](that: GenSeq[B]): Boolean
Tests whether this sequence contains a given sequence as a slice.
defcopyToArray(xs: Array[A], start: Int, len: Int): Unit
[use case] Copies elements of this sequence to an array.
defcopyToArray(xs: Array[A]): Unit
[use case] Copies values of this sequence to an array.
defcopyToArray(xs: Array[A], start: Int): Unit
[use case] Copies values of this sequence to an array.
defcopyToBuffer[B >: A](dest: Buffer[B]): Unit
Copies all elements of this sequence to a buffer.
defcorresponds[B](that: GenSeq[B])(p: (A, B) ⇒ Boolean): Boolean
Tests whether every element of this sequence relates to the corresponding element of another sequence by satisfying a test predicate.
defcount(p: (A) ⇒ Boolean): Int
Counts the number of elements in the sequence which satisfy a predicate.
defdiff(that: Seq[A]): Seq[A]
[use case] Computes the multiset difference between this sequence and another sequence.
defdistinct: Seq[A]
Builds a new sequence from this sequence without any duplicate elements.
defdrop(n: Int): Seq[A]
Selects all elements except first n ones.
defdropRight(n: Int): Seq[A]
Selects all elements except last n ones.
defdropWhile(p: (A) ⇒ Boolean): Seq[A]
Drops longest prefix of elements that satisfy a predicate.
defendsWith[B](that: GenSeq[B]): Boolean
Tests whether this sequence ends with the given sequence.
The equals method for arbitrary sequences.
Tests whether a predicate holds for some of the elements of this sequence.
deffilter(p: (A) ⇒ Boolean): Seq[A]
Selects all elements of this sequence which satisfy a predicate.
deffilterNot(p: (A) ⇒ Boolean): Seq[A]
Selects all elements of this sequence which do not satisfy a predicate.
Finds the first element of the sequence satisfying a predicate, if any.
[use case] Builds a new collection by applying a function to all elements of this sequence and using the elements of the resulting collections.
defflatten[B]: Seq[B]
[use case] Converts this sequence of traversable collections into a sequence formed by the elements of these traversable collections.
deffold[A1 >: A](z: A1)(op: (A1, A1) ⇒ A1): A1
Folds the elements of this sequence using the specified associative binary operator.
deffoldLeft[B](z: B)(op: (B, A) ⇒ B): B
Applies a binary operator to a start value and all elements of this sequence, going left to right.
deffoldRight[B](z: B)(op: (A, B) ⇒ B): B
Applies a binary operator to all elements of this sequence and a start value, going right to left.
Tests whether a predicate holds for all elements of this sequence.
defforeach(f: (A) ⇒ Unit): Unit
[use case] Applies a function f
to all elements of this sequence.
defgenericBuilder[B]: Builder[B, Seq[B]]
The generic builder that builds instances of Seq
at arbitrary element types.
defgroupBy[K](f: (A) ⇒ K): immutable.Map[K, Seq[A]]
Partitions this sequence into a map of sequences according to some discriminator function.
Partitions elements in fixed size sequences.
defhasDefiniteSize: Boolean
Tests whether this sequence is known to have a finite size.
defhashCode(): Int
Hashcodes for Seq
produce a value from the hashcodes of all the elements of the sequence.
defhead: A
Selects the first element of this sequence.
defheadOption: Option[A]
Optionally selects the first element.
defifParSeq[R](isbody: (ParSeq[A]) ⇒ R): (TraversableOps[A])#Otherwise[R]
defindexOf(elem: A, from: Int): Int
[use case] Finds index of first occurrence of some value in this sequence after or at some start index.
defindexOf(elem: A): Int
[use case] Finds index of first occurrence of some value in this sequence.
defindexOfSlice[B >: A](that: GenSeq[B], from: Int): Int
Finds first index after or at a start index where this sequence contains a given sequence as a slice.
defindexOfSlice[B >: A](that: GenSeq[B]): Int
Finds first index where this sequence contains a given sequence as a slice.
defindexWhere(p: (A) ⇒ Boolean, from: Int): Int
Finds index of the first element satisfying some predicate after or at some start index.
defindexWhere(p: (A) ⇒ Boolean): Int
Finds index of first element satisfying some predicate.
Produces the range of all indices of this sequence.
definit: Seq[A]
Selects all elements except the last.
Iterates over the inits of this sequence.
defintersect(that: Seq[A]): Seq[A]
[use case] Computes the multiset intersection between this sequence and another sequence.
defisDefinedAt(idx: Int): Boolean
Tests whether this sequence contains given index.
Tests whether this sequence is empty.
defisParIterable: Boolean
defisParallel: Boolean
final defisTraversableAgain: Boolean
Tests whether this sequence can be repeatedly traversed.
deflast: A
Selects the last element.
deflastIndexOf(elem: A, end: Int): Int
[use case] Finds index of last occurrence of some value in this sequence before or at a given end index.
deflastIndexOf(elem: A): Int
[use case] Finds index of last occurrence of some value in this sequence.
deflastIndexOfSlice[B >: A](that: GenSeq[B], end: Int): Int
Finds last index before or at a given end index where this sequence contains a given sequence as a slice.
deflastIndexOfSlice[B >: A](that: GenSeq[B]): Int
Finds last index where this sequence contains a given sequence as a slice.
deflastIndexWhere(p: (A) ⇒ Boolean, end: Int): Int
Finds index of last element satisfying some predicate before or at given end index.
deflastIndexWhere(p: (A) ⇒ Boolean): Int
Finds index of last element satisfying some predicate.
deflastOption: Option[A]
Optionally selects the last element.
deflengthCompare(len: Int): Int
Compares the length of this sequence to a test value.
Turns this partial function into an plain function returning an Option
result.
defmap[B](f: (A) ⇒ B): Seq[B]
[use case] Builds a new collection by applying a function to all elements of this sequence.
defmax: A
[use case] Finds the largest element.
defmaxBy[B](f: (A) ⇒ B)(implicit cmp: Ordering[B]): A
defmin: A
[use case] Finds the smallest element.
defminBy[B](f: (A) ⇒ B)(implicit cmp: Ordering[B]): A
defmkString: String
Displays all elements of this sequence in a string.
Displays all elements of this sequence in a string using a separator string.
Displays all elements of this sequence in a string using start, end, and separator strings.
Tests whether the sequence is not empty.
Composes this partial function with a fallback partial function which gets applied where this partial function is not defined.
defpadTo(len: Int, elem: A): Seq[A]
[use case] A copy of this sequence with an element value appended until a given target length is reached.
Returns a parallel implementation of this collection.
defpartition(p: (A) ⇒ Boolean): (Seq[A], Seq[A])
Partitions this sequence in two sequences according to a predicate.
defpatch(from: Int, that: GenSeq[A], replaced: Int): Seq[A]
[use case] Produces a new sequence where a slice of elements in this sequence is replaced by another sequence.
Iterates over distinct permutations.
defprefixLength(p: (A) ⇒ Boolean): Int
Returns the length of the longest prefix whose elements all satisfy some predicate.
defproduct: A
[use case] Multiplies up the elements of this collection.
defreduce[A1 >: A](op: (A1, A1) ⇒ A1): A1
Reduces the elements of this sequence using the specified associative binary operator.
defreduceLeft[B >: A](op: (B, A) ⇒ B): B
Applies a binary operator to all elements of this sequence, going left to right.
defreduceLeftOption[B >: A](op: (B, A) ⇒ B): Option[B]
Optionally applies a binary operator to all elements of this sequence, going left to right.
defreduceOption[A1 >: A](op: (A1, A1) ⇒ A1): Option[A1]
Reduces the elements of this sequence, if any, using the specified associative binary operator.
defreduceRight[B >: A](op: (A, B) ⇒ B): B
Applies a binary operator to all elements of this sequence, going right to left.
defreduceRightOption[B >: A](op: (A, B) ⇒ B): Option[B]
Optionally applies a binary operator to all elements of this sequence, going right to left.
defrepr: Seq[A]
The collection of type sequence underlying this TraversableLike
object.
defreverse: Seq[A]
Returns new sequence wih elements in reversed order.
defreverseIterator: Iterator[A]
An iterator yielding elements in reversed order.
defreverseMap[B](f: (A) ⇒ B): Seq[B]
[use case] Builds a new collection by applying a function to all elements of this sequence and collecting the results in reversed order.
defrunWith[U](action: (A) ⇒ U): (Int) ⇒ Boolean
Composes this partial function with an action function which gets applied to results of this partial function.
[use case] Checks if the other iterable collection contains the same elements in the same order as this sequence.
defscan[B >: A, That](z: B)(op: (B, B) ⇒ B)(implicit cbf: CanBuildFrom[Seq[A], B, That]): That
Computes a prefix scan of the elements of the collection.
defscanLeft[B, That](z: B)(op: (B, A) ⇒ B)(implicit bf: CanBuildFrom[Seq[A], B, That]): That
Produces a collection containing cumulative results of applying the operator going left to right.
defscanRight[B, That](z: B)(op: (A, B) ⇒ B)(implicit bf: CanBuildFrom[Seq[A], B, That]): That
Produces a collection containing cumulative results of applying the operator going right to left.
defsegmentLength(p: (A) ⇒ Boolean, from: Int): Int
Computes length of longest segment whose elements all satisfy some predicate.
defseq: Seq[A]
A version of this collection with all of the operations implemented sequentially (i.
defsize: Int
The size of this sequence, equivalent to length
.
defslice(from: Int, until: Int): Seq[A]
Selects an interval of elements.
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.
defsortBy[B](f: (A) ⇒ B)(implicit ord: math.Ordering[B]): Seq[A]
Sorts this Seq
according to the Ordering which results from transforming an implicitly given Ordering with a transformation function.
defsortWith(lt: (A, A) ⇒ Boolean): Seq[A]
Sorts this sequence according to a comparison function.
defsorted[B >: A](implicit ord: math.Ordering[B]): Seq[A]
Sorts this sequence according to an Ordering.
defspan(p: (A) ⇒ Boolean): (Seq[A], Seq[A])
Splits this sequence into a prefix/suffix pair according to a predicate.
defsplitAt(n: Int): (Seq[A], Seq[A])
Splits this sequence into two at a given position.
defstartsWith[B](that: GenSeq[B], offset: Int): Boolean
Tests whether this sequence contains the given sequence at a given index.
defstartsWith[B](that: GenSeq[B]): Boolean
Tests whether this sequence starts with the given sequence.
defstringPrefix: String
Defines the prefix of this object's toString
representation.
defsum: A
[use case] Sums up the elements of this collection.
deftail: Seq[A]
Selects all elements except the first.
Iterates over the tails of this sequence.
deftake(n: Int): Seq[A]
Selects first n elements.
deftakeRight(n: Int): Seq[A]
Selects last n elements.
deftakeWhile(p: (A) ⇒ Boolean): Seq[A]
Takes longest prefix of elements that satisfy a predicate.
defto[Col[_]]: Col[A]
[use case] Converts this sequence into another by copying all elements.
deftoArray: Array[A]
[use case] Converts this sequence to an array.
deftoBuffer[B >: A]: Buffer[B]
Converts this sequence to a mutable buffer.
Converts this sequence to an indexed sequence.
deftoIterable: Iterable[A]
Converts this sequence to an iterable collection.
deftoIterator: Iterator[A]
Returns an Iterator over the elements in this sequence.
deftoList: List[A]
Converts this sequence to a list.
deftoMap[T, U]: Map[T, U]
[use case] Converts this sequence to a map.
deftoParArray: ParArray[A]
deftoSeq: Seq[A]
Converts this sequence to a sequence.
Converts this sequence to a set.
Converts this sequence to a stream.
deftoString(): String
Converts this sequence to a string.
Converts this sequence to an unspecified Traversable.
deftoVector: Vector[A]
Converts this sequence to a Vector.
deftranspose[B](implicit asTraversable: (A) ⇒ GenTraversableOnce[B]): Seq[Seq[B]]
Transposes this sequence of traversable collections into a sequence of sequences.
defunion(that: Seq[A]): Seq[A]
[use case] Produces a new sequence which contains all elements of this sequence and also all elements of a given sequence.
defunzip[A1, A2](implicit asPair: (A) ⇒ (A1, A2)): (Seq[A1], Seq[A2])
Converts this sequence of pairs into two collections of the first and second half of each pair.
defunzip3[A1, A2, A3](implicit asTriple: (A) ⇒ (A1, A2, A3)): (Seq[A1], Seq[A2], Seq[A3])
Converts this sequence of triples into three collections of the first, second, and third element of each triple.
defupdated(index: Int, elem: A): Seq[A]
[use case] A copy of this sequence with one single replaced element.
defview(from: Int, until: Int): SeqView[A, Seq[A]]
Creates a non-strict view of a slice of this sequence.
Creates a non-strict view of this sequence.
Creates a non-strict filter of this sequence.
defzip[B](that: GenIterable[B]): Seq[(A, B)]
[use case] Returns a sequence formed from this sequence and another iterable collection by combining corresponding elements in pairs.
defzipAll[B](that: Iterable[B], thisElem: A, thatElem: B): Seq[(A, B)]
[use case] Returns a sequence formed from this sequence and another iterable collection by combining corresponding elements in pairs.
defzipWithIndex: Seq[(A, Int)]
[use case] Zips this sequence with its indices.