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>
-
-
Field Summary
Fields Modifier and Type Field Description private Fn1<A,SafeT.Body<M,B>>fprivate SafeT.Body<M,A>source
-
Constructor Summary
Constructors Modifier Constructor Description privateSuspended(SafeT.Body<M,A> source, Fn1<A,SafeT.Body<M,B>> f)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private <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> Reliminate(SafeT.Body.Suspended.Φ<M,B,R> Φ)<R> Rmatch(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.Either<MonadRec<SafeT.Body<M,B>,M>,B>resume()
-
-
-
Constructor Detail
-
Suspended
private Suspended(SafeT.Body<M,A> source, Fn1<A,SafeT.Body<M,B>> f)
-
-
Method Detail
-
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:CoProduct2Type-safe convergence requiring a match against all potential types.- Type Parameters:
R- result type- Parameters:
aFn- morphismA -> RbFn- morphismB -> R- Returns:
- the result of applying the appropriate morphism to this coproduct's unwrapped value
-
associateRight
private <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)
-
eliminate
private <R> R eliminate(SafeT.Body.Suspended.Φ<M,B,R> Φ)
-
-