Interface Fn4<A,B,C,D,E>
-
- Type Parameters:
A- The first argument typeB- The second argument typeC- The third argument typeD- The fourth argument typeE- The return type
- All Superinterfaces:
Applicative<Fn1<B,Fn1<C,Fn1<D,E>>>,Fn1<A,?>>,Cartesian<A,Fn1<B,Fn1<C,Fn1<D,E>>>,Fn1<?,?>>,Cocartesian<A,Fn1<B,Fn1<C,Fn1<D,E>>>,Fn1<?,?>>,Contravariant<A,Profunctor<?,Fn1<B,Fn1<C,Fn1<D,E>>>,Fn1<?,?>>>,Fn1<A,Fn1<B,Fn1<C,Fn1<D,E>>>>,Fn2<A,B,Fn1<C,Fn1<D,E>>>,Fn3<A,B,C,Fn1<D,E>>,Functor<Fn1<B,Fn1<C,Fn1<D,E>>>,Fn1<A,?>>,Monad<Fn1<B,Fn1<C,Fn1<D,E>>>,Fn1<A,?>>,MonadReader<A,Fn1<B,Fn1<C,Fn1<D,E>>>,Fn1<A,?>>,MonadRec<Fn1<B,Fn1<C,Fn1<D,E>>>,Fn1<A,?>>,MonadWriter<A,Fn1<B,Fn1<C,Fn1<D,E>>>,Fn1<A,?>>,Profunctor<A,Fn1<B,Fn1<C,Fn1<D,E>>>,Fn1<?,?>>
- All Known Subinterfaces:
BiMonoidFactory<A,B,C>,BiSemigroupFactory<A,B,C>,Fn5<A,B,C,D,E,F>,Fn6<A,B,C,D,E,F,G>,Fn7<A,B,C,D,E,F,G,H>,Fn8<A,B,C,D,E,F,G,H,I>
- All Known Implementing Classes:
Collapse,Collapse,IfThenElse,LiftA3,LiftA4,LiftA5,LiftA6,LiftA7,Merge,Merge,MergeMaps,RateLimit
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Fn4<A,B,C,D,E> extends Fn3<A,B,C,Fn1<D,E>>
A function taking four arguments. Defined in terms ofFn3, so similarly auto-curried.- See Also:
Fn3
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Fn3<B,C,D,E>apply(A a)Partially apply this function by taking its first argument.default Fn2<C,D,E>apply(A a, B b)Partially apply this function by taking its first two arguments.default Fn1<D,E>apply(A a, B b, C c)Partially apply this function by taking its first three arguments.default Eapply(A a, B b, C c, D d)Invoke this function with the given arguments.default Fn1<D,E>checkedApply(A a, B b, C c)EcheckedApply(A a, B b, C c, D d)default <Y,Z>
Fn5<Y,Z,B,C,D,E>compose(Fn2<? super Y,? super Z,? extends A> before)Right-to-left composition between different arity functions.default <Z> Fn4<Z,B,C,D,E>contraMap(Fn1<? super Z,? extends A> fn)Contravariantly mapA <- B.default <Z> Fn4<Z,B,C,D,E>diMapL(Fn1<? super Z,? extends A> fn)Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.default <F> Fn4<A,B,C,D,E>discardR(Applicative<F,Fn1<A,?>> appB)Sequence both thisApplicativeandappB, discardingappB'sresult and returning thisApplicative.default Fn4<B,A,C,D,E>flip()Flip the order of the first two arguments.static <A,B,C,D,E>
Fn4<A,B,C,D,E>fn4(Fn1<A,Fn3<B,C,D,E>> curriedFn1)static <A,B,C,D,E>
Fn4<A,B,C,D,E>fn4(Fn2<A,B,Fn2<C,D,E>> curriedFn2)static <A,B,C,D,E>
Fn4<A,B,C,D,E>fn4(Fn3<A,B,C,Fn1<D,E>> curriedFn3)static <A,B,C,D,E>
Fn4<A,B,C,D,E>fn4(Fn4<A,B,C,D,E> fn)Static factory method for coercing a lambda to anFn4.default Fn3<? super Product2<? extends A,? extends B>,C,D,E>uncurry()default <Z> Fn5<Z,A,B,C,D,E>widen()Widen this function's argument list by prepending an ignored argument of any type to the front.-
Methods inherited from interface com.jnape.palatable.lambda.functions.Fn1
andThen, carry, cartesian, censor, choose, cocartesian, diMap, diMapR, discardL, flatMap, fmap, lazyZip, listens, local, pure, self, thunk, toFunction, trampolineM, zip, zip
-
Methods inherited from interface com.jnape.palatable.lambda.functions.Fn2
checkedApply, toBiFunction
-
Methods inherited from interface com.jnape.palatable.lambda.functions.Fn3
checkedApply
-
-
-
-
Method Detail
-
checkedApply
E checkedApply(A a, B b, C c, D d) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
apply
default E apply(A a, B b, C c, D d)
Invoke this function with the given arguments.- Parameters:
a- the first argumentb- the second argumentc- the third argumentd- the fourth argument- Returns:
- the result of the function application
-
widen
default <Z> Fn5<Z,A,B,C,D,E> widen()
Widen this function's argument list by prepending an ignored argument of any type to the front.
-
apply
default Fn3<B,C,D,E> apply(A a)
Partially apply this function by taking its first argument.
-
apply
default Fn2<C,D,E> apply(A a, B b)
Partially apply this function by taking its first two arguments.
-
apply
default Fn1<D,E> apply(A a, B b, C c)
Partially apply this function by taking its first three arguments.
-
discardR
default <F> Fn4<A,B,C,D,E> discardR(Applicative<F,Fn1<A,?>> appB)
Description copied from interface:Fn2Sequence both thisApplicativeandappB, discardingappB'sresult and returning thisApplicative. This is generally useful for sequentially performing side-effects.- Specified by:
discardRin interfaceApplicative<A,B>- Specified by:
discardRin interfaceFn1<A,B>- Specified by:
discardRin interfaceFn2<A,B,C>- Specified by:
discardRin interfaceFn3<A,B,C,D>- Specified by:
discardRin interfaceMonad<A,B>- Specified by:
discardRin interfaceMonadReader<A,B,C>- Specified by:
discardRin interfaceMonadRec<A,B>- Specified by:
discardRin interfaceMonadWriter<A,B,C>- Type Parameters:
F- the type of appB's parameter- Parameters:
appB- the other Applicative- Returns:
- this Applicative
-
diMapL
default <Z> Fn4<Z,B,C,D,E> diMapL(Fn1<? super Z,? extends A> fn)
Description copied from interface:Fn2Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.- Specified by:
diMapLin interfaceCartesian<A,B,C>- Specified by:
diMapLin interfaceCocartesian<A,B,C>- Specified by:
diMapLin interfaceFn1<A,B>- Specified by:
diMapLin interfaceFn2<A,B,C>- Specified by:
diMapLin interfaceFn3<A,B,C,D>- Specified by:
diMapLin interfaceProfunctor<A,B,C>- Type Parameters:
Z- the new argument type- Parameters:
fn- the contravariant argument mapping function- Returns:
- an
Fn1<Z, B>
-
contraMap
default <Z> Fn4<Z,B,C,D,E> contraMap(Fn1<? super Z,? extends A> fn)
Description copied from interface:Fn2Contravariantly mapA <- B.- Specified by:
contraMapin interfaceCartesian<A,B,C>- Specified by:
contraMapin interfaceCocartesian<A,B,C>- Specified by:
contraMapin interfaceContravariant<A,B>- Specified by:
contraMapin interfaceFn1<A,B>- Specified by:
contraMapin interfaceFn2<A,B,C>- Specified by:
contraMapin interfaceFn3<A,B,C,D>- Specified by:
contraMapin interfaceProfunctor<A,B,C>- Type Parameters:
Z- the new parameter type- Parameters:
fn- the mapping function- Returns:
- the mapped Contravariant functor instance
-
compose
default <Y,Z> Fn5<Y,Z,B,C,D,E> compose(Fn2<? super Y,? super Z,? extends A> before)
Description copied from interface:Fn2Right-to-left composition between different arity functions. Preserves highest arity in the return type.- Specified by:
composein interfaceFn1<A,B>- Specified by:
composein interfaceFn2<A,B,C>- Specified by:
composein interfaceFn3<A,B,C,D>- Type Parameters:
Y- the resulting function's first argument typeZ- the resulting function's second argument type- Parameters:
before- the function to pass its return value to this function's input- Returns:
- an
Fn2<Y, Z, B>
-
fn4
static <A,B,C,D,E> Fn4<A,B,C,D,E> fn4(Fn1<A,Fn3<B,C,D,E>> curriedFn1)
- Type Parameters:
A- the first input argument typeB- the second input argument typeC- the third input argument typeD- the fourth input argument typeE- the output type- Parameters:
curriedFn1- the curried fn1 to adapt- Returns:
- the
Fn4
-
fn4
static <A,B,C,D,E> Fn4<A,B,C,D,E> fn4(Fn2<A,B,Fn2<C,D,E>> curriedFn2)
- Type Parameters:
A- the first input argument typeB- the second input argument typeC- the third input argument typeD- the fourth input argument typeE- the output type- Parameters:
curriedFn2- the curried fn2 to adapt- Returns:
- the
Fn4
-
fn4
static <A,B,C,D,E> Fn4<A,B,C,D,E> fn4(Fn3<A,B,C,Fn1<D,E>> curriedFn3)
- Type Parameters:
A- the first input argument typeB- the second input argument typeC- the third input argument typeD- the fourth input argument typeE- the output type- Parameters:
curriedFn3- the curried fn3 to adapt- Returns:
- the
Fn4
-
fn4
static <A,B,C,D,E> Fn4<A,B,C,D,E> fn4(Fn4<A,B,C,D,E> fn)
Static factory method for coercing a lambda to anFn4.- Type Parameters:
A- the first input argument typeB- the second input argument typeC- the third input argument typeD- the fourth input argument typeE- the output type- Parameters:
fn- the lambda to coerce- Returns:
- the
Fn4
-
-