Prism

object Prism
class Object
trait Matchable
class Any

Value members

Concrete methods

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

Constructs a Prism from a get and a set function.

Constructs a Prism from a get and a set function.

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

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

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

def left[A, B]: Prism[Either[A, B], A]

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]: Prism[Either[A, B], B]

An optic that accesses the Right case of an Either.

An optic that accesses the Right case of an Either.

def some[A]: Prism[Option[A], A]

An optic that accesses the Some case of an Option.

An optic that accesses the Some case of an Option.