NonEmptyCons

@implicitNotFound("Could not find an instance of NonEmptyCons[${S}, ${H}, ${T}]")
trait NonEmptyCons[S, H, T] extends Serializable

The NonEmptyCons typeclass provides an Iso for a way to attach or detach elements on the left side of a structure.

The NonEmptyCons is similar to Cons, but is suitable for Non empty structures.

Type parameters:
H

the head part of the focus (H, T) of an Iso

S

the source of an Iso

T

the tail part of the focus (H, T) of an Iso

Companion:
object
class Object
trait Matchable
class Any

Value members

Abstract methods

def nonEmptyCons: Iso[S, (H, T)]

Concrete methods

def head: Lens[S, H]
def tail: Lens[S, T]