Interface Fn4<A,​B,​C,​D,​E>

    • 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 E apply​(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)
      E checkedApply​(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 map A <- 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 this Applicative and appB, discarding appB's result and returning this Applicative.
      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 factory method for wrapping a curried Fn1 in an Fn4.
      static <A,​B,​C,​D,​E>
      Fn4<A,​B,​C,​D,​E>
      fn4​(Fn2<A,​B,​Fn2<C,​D,​E>> curriedFn2)
      Static factory method for wrapping a curried Fn2 in an Fn4.
      static <A,​B,​C,​D,​E>
      Fn4<A,​B,​C,​D,​E>
      fn4​(Fn3<A,​B,​C,​Fn1<D,​E>> curriedFn3)
      Static factory method for wrapping a curried Fn3 in an 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 an Fn4.
      default Fn3<? super Product2<? extends A,​? extends B>,​C,​D,​E> uncurry()
      Returns an Fn3 that takes the first two arguments as a Product2<A, B> and the third and fourth arguments.
      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.Fn3

        checkedApply
      • Methods inherited from interface com.jnape.palatable.lambda.functor.Functor

        coerce
    • 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 argument
        b - the second argument
        c - the third argument
        d - the fourth argument
        Returns:
        the result of the function application
      • checkedApply

        default Fn1<D,​E> checkedApply​(A a,
                                            B b,
                                            C c)
                                     throws java.lang.Throwable
        Specified by:
        checkedApply in interface Fn3<A,​B,​C,​D>
        Throws:
        java.lang.Throwable
      • 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.
        Specified by:
        widen in interface Fn1<A,​B>
        Specified by:
        widen in interface Fn2<A,​B,​C>
        Specified by:
        widen in interface Fn3<A,​B,​C,​D>
        Type Parameters:
        Z - the new first argument type
        Returns:
        the widened function
      • apply

        default Fn3<B,​C,​D,​E> apply​(A a)
        Partially apply this function by taking its first argument.
        Specified by:
        apply in interface Fn1<A,​B>
        Specified by:
        apply in interface Fn2<A,​B,​C>
        Specified by:
        apply in interface Fn3<A,​B,​C,​D>
        Parameters:
        a - the first argument
        Returns:
        an Fn3<B, C, D, E>
      • apply

        default Fn2<C,​D,​E> apply​(A a,
                                             B b)
        Partially apply this function by taking its first two arguments.
        Specified by:
        apply in interface Fn2<A,​B,​C>
        Specified by:
        apply in interface Fn3<A,​B,​C,​D>
        Parameters:
        a - the first argument
        b - the second argument
        Returns:
        an Fn2<C, D, E>
      • apply

        default Fn1<D,​E> apply​(A a,
                                     B b,
                                     C c)
        Partially apply this function by taking its first three arguments.
        Specified by:
        apply in interface Fn3<A,​B,​C,​D>
        Parameters:
        a - the first argument
        b - the second argument
        c - the third argument
        Returns:
        an Fn1<D, E>
      • flip

        default Fn4<B,​A,​C,​D,​E> flip()
        Flip the order of the first two arguments.
        Specified by:
        flip in interface Fn2<A,​B,​C>
        Specified by:
        flip in interface Fn3<A,​B,​C,​D>
        Returns:
        an Fn4<B, A, C, D, E>
      • uncurry

        default Fn3<? super Product2<? extends A,​? extends B>,​C,​D,​E> uncurry()
        Returns an Fn3 that takes the first two arguments as a Product2<A, B> and the third and fourth arguments.
        Specified by:
        uncurry in interface Fn2<A,​B,​C>
        Specified by:
        uncurry in interface Fn3<A,​B,​C,​D>
        Returns:
        an Fn3 taking a Product2 and the third and fourth arguments
      • discardR

        default <F> Fn4<A,​B,​C,​D,​E> discardR​(Applicative<F,​Fn1<A,​?>> appB)
        Description copied from interface: Fn2
        Sequence both this Applicative and appB, discarding appB's result and returning this Applicative. This is generally useful for sequentially performing side-effects.
        Specified by:
        discardR in interface Applicative<A,​B>
        Specified by:
        discardR in interface Fn1<A,​B>
        Specified by:
        discardR in interface Fn2<A,​B,​C>
        Specified by:
        discardR in interface Fn3<A,​B,​C,​D>
        Specified by:
        discardR in interface Monad<A,​B>
        Specified by:
        discardR in interface MonadReader<A,​B,​C>
        Specified by:
        discardR in interface MonadRec<A,​B>
        Specified by:
        discardR in interface MonadWriter<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: Fn2
        Contravariantly map over the argument to this function, producing a function that takes the new argument type, and produces the same result.
        Specified by:
        diMapL in interface Cartesian<A,​B,​C>
        Specified by:
        diMapL in interface Cocartesian<A,​B,​C>
        Specified by:
        diMapL in interface Fn1<A,​B>
        Specified by:
        diMapL in interface Fn2<A,​B,​C>
        Specified by:
        diMapL in interface Fn3<A,​B,​C,​D>
        Specified by:
        diMapL in interface Profunctor<A,​B,​C>
        Type Parameters:
        Z - the new argument type
        Parameters:
        fn - the contravariant argument mapping function
        Returns:
        an Fn1<Z, B>
      • compose

        default <Y,​Z> Fn5<Y,​Z,​B,​C,​D,​E> compose​(Fn2<? super Y,​? super Z,​? extends A> before)
        Description copied from interface: Fn2
        Right-to-left composition between different arity functions. Preserves highest arity in the return type.
        Specified by:
        compose in interface Fn1<A,​B>
        Specified by:
        compose in interface Fn2<A,​B,​C>
        Specified by:
        compose in interface Fn3<A,​B,​C,​D>
        Type Parameters:
        Y - the resulting function's first argument type
        Z - 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)
        Static factory method for wrapping a curried Fn1 in an Fn4.
        Type Parameters:
        A - the first input argument type
        B - the second input argument type
        C - the third input argument type
        D - the fourth input argument type
        E - 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)
        Static factory method for wrapping a curried Fn2 in an Fn4.
        Type Parameters:
        A - the first input argument type
        B - the second input argument type
        C - the third input argument type
        D - the fourth input argument type
        E - 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)
        Static factory method for wrapping a curried Fn3 in an Fn4.
        Type Parameters:
        A - the first input argument type
        B - the second input argument type
        C - the third input argument type
        D - the fourth input argument type
        E - 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 an Fn4.
        Type Parameters:
        A - the first input argument type
        B - the second input argument type
        C - the third input argument type
        D - the fourth input argument type
        E - the output type
        Parameters:
        fn - the lambda to coerce
        Returns:
        the Fn4