public static enum IdF.Instance extends Enum<instance IdF<_>> implements Functor IdF<_>, Applicative IdF<_>
| Enum Constant and Description |
|---|
INSTANCE
The singleton instance of this type.
|
| Modifier and Type | Method and Description |
|---|---|
<A,R> (IdF<A>) -> IdF<R> |
lift1(IdF<(A) -> R> function)
Lifts a wrapped transformation function into a function between containers.
|
<A,B,R> (IdF<A>,IdF<B>) -> IdF<R> |
lift2(IdF<(A,B) -> R> function)
Lifts a wrapped
BiFunction into a BiFunction between containers. |
<T,R> IdF<R> |
map((? super T) -> ? extends R func,
IdF<T> ts)
Maps the contents of
ts from T to R using the func. |
<A> IdF<A> |
point(A a)
Wraps a value in a container, for example an object in a list.
|
static instance IdF<_> |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static instance IdF<_>[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfpublic static final instance IdF<_> INSTANCE
public static instance IdF<_>[] values()
for (IdF.Instance c : IdF.Instance.values()) System.out.println(c);
public static instance IdF<_> valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic <T,R> IdF<R> map((? super T) -> ? extends R func, IdF<T> ts)
Functorts from T to R using the func.public <A> IdF<A> point(A a)
Applicativepoint in interface Applicative IdF<_>A - The type of the value.a - The input value.public <A,R> (IdF<A>) -> IdF<R> lift1(IdF<(A) -> R> function)
Applicativelift1 in interface Applicative IdF<_>A - The input type.R - The output type.function - The container containing the transformation function.public <A,B,R> (IdF<A>,IdF<B>) -> IdF<R> lift2(IdF<(A,B) -> R> function)
ApplicativeBiFunction into a BiFunction between containers.lift2 in interface Applicative IdF<_>A - The first input type.B - The second input type.R - The output type.function - The container containing the transformation function.