| Modifier and Type | Class and Description |
|---|---|
static class |
Eval.μ
The witness type of
Eval. |
| Constructor and Description |
|---|
Eval() |
| Modifier and Type | Method and Description |
|---|---|
<B> Eval<B> |
apply(Applicative<Eval.μ,? extends F1<? super A,? extends B>> f)
Apply a function contained within an applicative to the contents of this applicative.
|
<B> Eval<B> |
bind(F1<? super A,? extends Monad<Eval.μ,B>> fn)
Chains together this computation with a function that produces computations of this type.
|
static <A> Eval<A> |
later(F0<A> fn)
Constructs an eval from a supplier of a value.
|
static <A,B,C> Eval<C> |
liftM2(Monad<Eval.μ,A> m,
Monad<Eval.μ,B> m1,
F2<? super A,? super B,C> fn) |
abstract <B> Eval<B> |
map(F1<? super A,? extends B> fn)
Map applies the function
fn to the contents of this Functor, returning a new Functor
whose contents is the result of that function application. |
static <B> Eval<B> |
monad(Monad<Eval.μ,B> monad)
A helper function to convert/narrow a reference from a monad to its underlying type.
|
static <A> Eval<A> |
now(A a)
Constructs an eval from a value.
|
ApplicativeFactory<Eval.μ> |
pure()
Returns a strategy for creating an applicative of this type.
|
<B> Eval<B> |
semi(Monad<Eval.μ,B> mb)
Chains together this computation with the given argument, discarding the value within this monad returning a new monad.
|
abstract A |
value()
Returns the value witin this eval.
|
MonadFactory<Eval.μ> |
yield()
A strategy for creating a monad of this type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic <B> Eval<B> apply(Applicative<Eval.μ,? extends F1<? super A,? extends B>> f)
Applicativepublic ApplicativeFactory<Eval.μ> pure()
Applicativepure in interface Applicative<Eval.μ,A>public MonadFactory<Eval.μ> yield()
Monadpublic abstract <B> Eval<B> map(F1<? super A,? extends B> fn)
Functorfn to the contents of this Functor, returning a new Functor
whose contents is the result of that function application.map in interface Applicative<Eval.μ,A>map in interface Functor<Eval.μ,A>map in interface Monad<Eval.μ,A>B - the type of the contents of the new Functor.fn - the function that will map over the contents of this functor.Functor containing the result of fn.public <B> Eval<B> bind(F1<? super A,? extends Monad<Eval.μ,B>> fn)
Monadpublic <B> Eval<B> semi(Monad<Eval.μ,B> mb)
Monadpublic abstract A value()
public static <A> Eval<A> now(A a)
a - a value to be lifted into an eval.public static <A> Eval<A> later(F0<A> fn)
fn - a supplier.public static <B> Eval<B> monad(Monad<Eval.μ,B> monad)
monad - the monad to be casted to its original type.Copyright © 2018. All rights reserved.