ZPrism

object ZPrism
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[S, T, A, B](get: S => OpticResult[(OpticFailure, T), A], set: B => OpticResult[Nothing, T]): ZPrism[S, T, A, B]

Constructs a ZPrism from a get and a set function.

Constructs a ZPrism from a get and a set function.

def cons[A, B]: ZPrism[List[A], List[B], (A, List[A]), (B, List[B])]

An optic that accesses the :: case of a List.

An optic that accesses the :: case of a List.

def left[A, B, C]: ZPrism[Either[A, B], Either[C, B], A, C]

An optic that accesses the Left case of an Either.

An optic that accesses the Left case of an Either.

def none[A]: Prism[Option[A], Unit]

An optic that accesses the None case of an Option.

An optic that accesses the None case of an Option.

def right[A, B, C]: ZPrism[Either[A, B], Either[A, C], B, C]

An optic that accesses the Right case of an Either.

An optic that accesses the Right case of an Either.

def some[A, B]: ZPrism[Option[A], Option[B], A, B]

An optic that accesses the Some case of an Option.

An optic that accesses the Some case of an Option.