Cons

object Cons extends ConsFunctions
Companion
class
Source
Cons.scala
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[S, A, B](prism: Prism[S, (B, S)]): Cons[S, B]
def fromIso[S, A, B](iso: Iso[S, A])(ev: Cons[A, B]): Cons[S, B]

lift an instance of Cons using an Iso

lift an instance of Cons using an Iso

Source
Cons.scala

Deprecated and Inherited methods

@deprecated("no replacement", since = "3.0.0-M1")
final def _cons[S, A](head: A, tail: S)(ev: Cons[S, A]): S

append an element to the head

append an element to the head

Deprecated
[Since version 3.0.0-M1]
Inherited from
ConsFunctions
Source
Cons.scala
@deprecated("no replacement", since = "3.0.0-M1")
final def _uncons[S, A](s: S)(ev: Cons[S, A]): Option[(A, S)]

deconstruct an S between its head and tail

deconstruct an S between its head and tail

Deprecated
[Since version 3.0.0-M1]
Inherited from
ConsFunctions
Source
Cons.scala
@deprecated("no replacement", since = "3.0.0-M1")
final def cons[S, A](ev: Cons[S, A]): Prism[S, (A, S)]
Deprecated
[Since version 3.0.0-M1]
Inherited from
ConsFunctions
Source
Cons.scala
@deprecated("use index(0)", since = "3.0.0-M1")
final def headOption[S, A](ev: Cons[S, A]): Optional[S, A]
Deprecated
[Since version 3.0.0-M1]
Inherited from
ConsFunctions
Source
Cons.scala
@deprecated("no replacement", since = "3.0.0-M1")
final def tailOption[S, A](ev: Cons[S, A]): Optional[S, S]
Deprecated
[Since version 3.0.0-M1]
Inherited from
ConsFunctions
Source
Cons.scala

Implicits

Implicits

implicit def chainCons[A]: Cons[Chain[A], A]
implicit def lazyListCons[A]: Cons[LazyList[A], A]
implicit def listCons[A]: Cons[List[A], A]

Source
Cons.scala
implicit val stringCons: Cons[String, Char]
implicit def vectorCons[A]: Cons[Vector[A], A]