Package fj.data.hlist

Class HList.Apply<F$,​A,​R>

  • Type Parameters:
    F$ - The type of the function to apply.
    A - The domain of the function.
    R - The function's codomain.
    Enclosing class:
    HList<A extends HList<A>>

    public abstract static class HList.Apply<F$,​A,​R>
    extends java.lang.Object
    Type-level function application operators.
    • Constructor Detail

      • Apply

        public Apply()
    • Method Detail

      • apply

        public abstract R apply​(F$ f,
                                A a)
      • f

        public static <X,​Y> HList.Apply<F<X,​Y>,​X,​Y> f()
        Function application operator.
        Returns:
        an operator that applies a given function to a given argument.
      • id

        public static <X> HList.Apply<Unit,​X,​X> id()
        Identity operator
        Returns:
        An operator that returns its second argument no matter which function is being applied.
      • comp

        public static <X,​Y,​Z> HList.Apply<Unit,​P2<F<X,​Y>,​F<Y,​Z>>,​F<X,​Z>> comp()
        A function application operator for function composition.
        Type Parameters:
        X - The domain.
        Y - The type through which to compose.
        Z - The codomain.
        Returns:
        an operator that composes functions.
      • cons

        public static <E,​L extends HList<L>> HList.Apply<Unit,​P2<E,​L>,​HList.HCons<E,​L>> cons()
        An operator for the construction of heterogeneous lists.
        Returns:
        an operator that constructs heterogeneous lists.
      • append

        public static <A,​B,​C> HList.Apply<HList.HAppend<A,​B,​C>,​P2<A,​B>,​C> append()
        A function application operator for concatenating heterogeneous lists.
        Type Parameters:
        A - The type of the list to which to append.
        B - The type of the list to append.
        C - The type of the concatenated list.
        Returns:
        an operator that concatenates heterogeneous lists.