Package | Description |
---|---|
com.jnape.palatable.lambda.adt | |
com.jnape.palatable.lambda.io | |
com.jnape.palatable.lambda.monad |
Modifier and Type | Class and Description |
---|---|
class |
Either<L,R>
The binary tagged union, implemented as a specialized
CoProduct2 . |
class |
Maybe<A>
The optional type, representing a potentially absent value.
|
class |
Try<A>
A
Monad of the evaluation outcome of an expression that might throw. |
Modifier and Type | Class and Description |
---|---|
class |
IO<A>
A
Monad representing some side-effecting computation to be performed. |
Modifier and Type | Interface and Description |
---|---|
interface |
MonadError<E,A,M extends MonadError<E,?,M>>
An interface for
monads that can be interrupted with some type of error. |
Modifier and Type | Method and Description |
---|---|
MonadError<E,A,M> |
MonadError.catchError(Fn1<? super E,? extends Monad<A,M>> recoveryFn)
|
default <B> MonadError<E,B,M> |
MonadError.discardL(Applicative<B,M> appB)
Sequence both this
Applicative and appB , discarding this Applicative's
result and returning appB . |
default <B> MonadError<E,A,M> |
MonadError.discardR(Applicative<B,M> appB)
Sequence both this
Applicative and appB , discarding appB's result and
returning this Applicative . |
<B> MonadError<E,B,M> |
MonadError.flatMap(Fn1<? super A,? extends Monad<B,M>> f)
Chain dependent computations that may continue or short-circuit based on previous results.
|
default <B> MonadError<E,B,M> |
MonadError.fmap(Fn1<? super A,? extends B> fn)
Covariantly transmute this functor's parameter using the given mapping function.
|
<B> MonadError<E,B,M> |
MonadError.pure(B b)
Lift the value
b into this applicative functor. |
MonadError<E,A,M> |
MonadError.throwError(E e)
Throw an error value of type
E into the monad . |
default <B> MonadError<E,B,M> |
MonadError.zip(Applicative<Fn1<? super A,? extends B>,M> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using
whatever application semantics the current applicative supports.
|
Modifier and Type | Method and Description |
---|---|
default <B> Lazy<? extends MonadError<E,B,M>> |
MonadError.lazyZip(Lazy<? extends Applicative<Fn1<? super A,? extends B>,M>> lazyAppFn)
Given a
lazy instance of this applicative over a mapping function, "zip" the two instances together
using whatever application semantics the current applicative supports. |