+:

scala.collection.`package`.+:
object +:

An extractor used to head/tail deconstruct sequences.

Attributes

Source
package.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
+:.type

Members list

Value members

Concrete methods

def unapply[A, CC <: ([_] =>> Seq[_]), C <: SeqOps[A, CC, C]](t: C & SeqOps[A, CC, C]): Option[(A, C)]

Splits a sequence into head +: tail.

Splits a sequence into head +: tail.

Type parameters

A

the element type of the sequence

CC

the type constructor of the sequence (e.g., List, Vector)

Attributes

Returns

Some((head, tail)) if the sequence is non-empty, None otherwise

Source
package.scala