Package com.jnape.palatable.lambda.monad
Class SafeT.Body.Suspended<M extends MonadRec<?,M>,A,B>
java.lang.Object
com.jnape.palatable.lambda.monad.SafeT.Body<M,B>
com.jnape.palatable.lambda.monad.SafeT.Body.Suspended<M,A,B>
- All Implemented Interfaces:
CoProduct2<Either<MonadRec<SafeT.Body<M,
B>, M>, B>, SafeT.Body.Suspended<M, ?, B>, SafeT.Body<M, B>>
- Enclosing class:
SafeT.Body<M extends MonadRec<?,
M>, A>
private static final class SafeT.Body.Suspended<M extends MonadRec<?,M>,A,B>
extends SafeT.Body<M,B>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Fn1
<A, SafeT.Body<M, B>> private final SafeT.Body
<M, A> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Suspended
(SafeT.Body<M, A> source, Fn1<A, SafeT.Body<M, B>> f) -
Method Summary
Modifier and TypeMethodDescriptionprivate <Z> Fn1
<SafeT.Body.Suspended<M, ?, Z>, RecursiveResult<SafeT.Body<M, B>, Either<MonadRec<SafeT.Body<M, B>, M>, B>>> associateRight
(Fn1<Z, SafeT.Body<M, B>> f) private <R> R
eliminate
(SafeT.Body.Suspended.Φ<M, B, R> Φ) <R> R
match
(Fn1<? super Either<MonadRec<SafeT.Body<M, B>, M>, B>, ? extends R> aFn, Fn1<? super SafeT.Body.Suspended<M, ?, B>, ? extends R> bFn) Type-safe convergence requiring a match against all potential types.resume()
-
Field Details
-
source
-
f
-
-
Constructor Details
-
Suspended
-
-
Method Details
-
resume
-
match
public <R> R match(Fn1<? super Either<MonadRec<SafeT.Body<M, B>, M>, B>, ? extends R> aFn, Fn1<? super SafeT.Body.Suspended<M, ?, B>, ? extends R> bFn) Description copied from interface:CoProduct2
Type-safe convergence requiring a match against all potential types.- Type Parameters:
R
- result type- Parameters:
aFn
- morphismA -> R
bFn
- morphismB -> R
- Returns:
- the result of applying the appropriate morphism to this coproduct's unwrapped value
-
associateRight
private <Z> Fn1<SafeT.Body.Suspended<M,?, associateRightZ>, RecursiveResult<SafeT.Body<M, B>, Either<MonadRec<SafeT.Body<M, B>, M>, B>>> (Fn1<Z, SafeT.Body<M, B>> f) -
eliminate
-