Uses of Interface
com.jnape.palatable.lambda.optics.Prism
-
Packages that use Prism Package Description com.jnape.palatable.lambda.optics com.jnape.palatable.lambda.optics.prisms -
-
Uses of Prism in com.jnape.palatable.lambda.optics
Subinterfaces of Prism in com.jnape.palatable.lambda.optics Modifier and Type Interface Description static interface
Prism.Simple<S,A>
A convenience type with a simplified type signature for commonprism
with unifiedS/T
andA/B
types.Methods in com.jnape.palatable.lambda.optics that return Prism Modifier and Type Method Description default <Z,C>
Prism<S,T,Z,C>Prism. andThen(ProtoOptic<? super Cocartesian<?,?,?>,A,B,Z,C> f)
Left-to-right composition of proto-optics.default <R,U>
Prism<R,U,A,B>Prism. compose(ProtoOptic<? super Cocartesian<?,?,?>,R,U,S,T> g)
Right-to-Left composition of proto-optics.default <R> Prism<R,T,A,B>
Prism. contraMap(Fn1<? super R,? extends S> fn)
Contravariantly mapA <- B
.default <R,U>
Prism<R,U,A,B>Prism. diMap(Fn1<? super R,? extends S> lFn, Fn1<? super T,? extends U> rFn)
Dually map contravariantly over the left parameter and covariantly over the right parameter.default <R> Prism<R,T,A,B>
Prism. diMapL(Fn1<? super R,? extends S> fn)
Contravariantly map over the left parameter.default <U> Prism<S,U,A,B>
Prism. diMapR(Fn1<? super T,? extends U> fn)
Covariantly map over the right parameter.default <U> Prism<S,U,A,B>
Prism. discardL(Applicative<U,Prism<S,?,A,B>> appB)
Sequence both thisApplicative
andappB
, discarding thisApplicative's
result and returningappB
.default <U> Prism<S,T,A,B>
Prism. discardR(Applicative<U,Prism<S,?,A,B>> appB)
Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.default <U> Prism<S,U,A,B>
Prism. flatMap(Fn1<? super T,? extends Monad<U,Prism<S,?,A,B>>> f)
Chain dependent computations that may continue or short-circuit based on previous results.default <U> Prism<S,U,A,B>
Prism. fmap(Fn1<? super T,? extends U> fn)
Covariantly transmute this functor's parameter using the given mapping function.static <S,A,B>
Prism<S,S,A,B>Prism. fromPartial(Fn1<? super S,? extends A> partialSa, Fn1<? super B,? extends S> bs)
Static factory method for creating aPrism
from a partial functionS -> A
and a total functionB -> S
.default <C> Prism<S,T,C,B>
Prism. mapA(Fn1<? super A,? extends C> fn)
Covariantly mapA
toC
, yielding a new optic.default <Z> Prism<S,T,A,Z>
Prism. mapB(Fn1<? super Z,? extends B> fn)
Contravariantly mapB
toZ
, yielding a new optic.default <R> Prism<R,T,A,B>
Prism. mapS(Fn1<? super R,? extends S> fn)
Contravariantly mapS
toR
, yielding a new optic.default <U> Prism<S,U,A,B>
Prism. mapT(Fn1<? super T,? extends U> fn)
Covariantly mapT
toU
, yielding a new optic.static <S,T,A,B>
Prism<S,T,A,B>Prism. prism(Fn1<? super S,? extends CoProduct2<T,A,?>> sta, Fn1<? super B,? extends T> bt)
static <S,T,A,B>
Prism<S,T,A,B>Prism. prism(Optic<? super Cocartesian<?,?,?>,? super Functor<?,?>,S,T,A,B> optic)
static <S,T,A,B>
Prism<S,T,A,B>Prism. prism(ProtoOptic<? super Cocartesian<?,?,?>,S,T,A,B> protoOptic)
Promote aProtoOptic
with compatible bounds to anPrism
.default <U> Prism<S,U,A,B>
Prism. pure(U u)
Lift the valueb
into this applicative functor.default <U> Prism<S,U,A,B>
Prism. trampolineM(Fn1<? super T,? extends MonadRec<RecursiveResult<T,U>,Prism<S,?,A,B>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.default <U> Prism<S,U,A,B>
Prism. zip(Applicative<Fn1<? super T,? extends U>,Prism<S,?,A,B>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Methods in com.jnape.palatable.lambda.optics that return types with arguments of type Prism Modifier and Type Method Description default <U> Lazy<Prism<S,U,A,B>>
Prism. lazyZip(Lazy<? extends Applicative<Fn1<? super T,? extends U>,Prism<S,?,A,B>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.static <S,A,B>
Pure<Prism<S,?,A,B>>Prism. purePrism()
Methods in com.jnape.palatable.lambda.optics with parameters of type Prism Modifier and Type Method Description static <S,A>
Prism.Simple<S,A>Prism.Simple. adapt(Prism<S,S,A,A> prism)
Adapt aPrism
with compatible bounds to asimple Prism
.Method parameters in com.jnape.palatable.lambda.optics with type arguments of type Prism Modifier and Type Method Description default <U> Prism<S,U,A,B>
Prism. discardL(Applicative<U,Prism<S,?,A,B>> appB)
Sequence both thisApplicative
andappB
, discarding thisApplicative's
result and returningappB
.default <U> Prism<S,T,A,B>
Prism. discardR(Applicative<U,Prism<S,?,A,B>> appB)
Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.default <U> Prism<S,U,A,B>
Prism. flatMap(Fn1<? super T,? extends Monad<U,Prism<S,?,A,B>>> f)
Chain dependent computations that may continue or short-circuit based on previous results.default <U> Lazy<Prism<S,U,A,B>>
Prism. lazyZip(Lazy<? extends Applicative<Fn1<? super T,? extends U>,Prism<S,?,A,B>>> lazyAppFn)
Given alazy
instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.default <U> Prism<S,U,A,B>
Prism. trampolineM(Fn1<? super T,? extends MonadRec<RecursiveResult<T,U>,Prism<S,?,A,B>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.default <U> Prism<S,U,A,B>
Prism. zip(Applicative<Fn1<? super T,? extends U>,Prism<S,?,A,B>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports. -
Uses of Prism in com.jnape.palatable.lambda.optics.prisms
Methods in com.jnape.palatable.lambda.optics.prisms that return Prism Modifier and Type Method Description static <A,B>
Prism<Maybe<A>,Maybe<B>,A,B>MaybePrism. _just()
static <M extends java.util.Map<K,V>,K,V>
Prism<java.util.Map<K,V>,M,V,V>MapPrism. valueAt(Fn1<java.util.Map<K,V>,M> copyFn, K k)
APrism
that focuses on the value at a key in aMap
, and produces an instance ofM
on the way back out.
-