Scala Library: scala.collection.:+
scala.collection.:+
An extractor used to init/last deconstruct sequences.
Value Members From scala.collection.:+
def unapply[T, Coll <: SeqLike[T, Coll]](t: Coll with SeqLike[T, Coll]): Option[(Coll, T)]
Splits a sequence into init :+ tail.
- returns
- Some((init, tail)) if sequence is non-empty. None otherwise. (defined at scala.collection.:+)
Full Source:
Interested in Scala?
I send out weekly, personalized emails with articles and conference talks.
Subscribe now.