APrism

object APrism
class Object
trait Matchable
class Any
APrism.type

Value members

Concrete methods

final def apply[S, A](viewOrModify: S => Either[S, A])(review: A => S): APrism[S, A]

create a monomorphic APrism from a matcher function that produces an Either and a review function

create a monomorphic APrism from a matcher function that produces an Either and a review function

the matcher function returns an Either to allow for type-changing prisms in the case where the input does not match.

final def fromPartial[S, A](preview: PartialFunction[S, A])(review: A => S): APrism[S, A]

create a monomorphic APrism, using a partial function and a review function

create a monomorphic APrism, using a partial function and a review function

final def fromPreview[S, A](preview: S => Option[A])(review: A => S): APrism[S, A]

create a monomorphic APrism, using preview and review functions

create a monomorphic APrism, using preview and review functions

final def id[S]: APrism[S, S]

monomorphic identity of an APrism

monomorphic identity of an APrism

final def nearly[A](a: A)(predicate: A => Boolean)(implicit ev: Alternative[Option]): Prism[A, Unit]

create a monomorphic APrism that checks whether the focus matches a predicate

create a monomorphic APrism that checks whether the focus matches a predicate

final def only[A : Eq](a: A)(implicit evidence$10: Eq[A], ev: Alternative[Option]): Prism[A, Unit]

create a monomorphic APrism that checks whether the focus matches a single value

create a monomorphic APrism that checks whether the focus matches a single value