Interface Pure<F extends Functor<?,​? extends F>>

  • Type Parameters:
    F - the Functor to lift into
    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 Pure<F extends Functor<?,​? extends F>>
    Generalized, portable Applicative.pure(Object), with a loosened Functor constraint.
    • Method Detail

      • checkedApply

        <A> Functor<A,​? extends F> checkedApply​(A a)
                                               throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • apply

        default <A,​FA extends Functor<A,​? extends F>> FA apply​(A a)
      • pure

        static <F extends Functor<?,​? extends F>> Pure<F> pure​(Pure<F> pure)
        Static method to aid inference.
        Type Parameters:
        F - the Functor witness
        Parameters:
        pure - the Pure
        Returns:
        the Pure