:+

object :+

An extractor used to init/last deconstruct sequences.

Source:
package.scala
class Object
trait Matchable
class Any

Value members

Concrete methods

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

Splits a sequence into init :+ last.

Splits a sequence into init :+ last.

Returns:

Some((init, last)) if sequence is non-empty. None otherwise.

Source:
package.scala