TYPE
- Type of recursive self-type which Applicative
describesT1
- First type described by this Applicative
(usually the error type)T2
- Second type described by this Applicative
(usually the success type)public interface Applicative<TYPE extends Kind2<TYPE,?,?>,T1,T2> extends Kind2<TYPE,T1,T2>, Functor<T2>
Functor
s, which applies a pure function to a value inside of a context, Applicative
s
allow a function wrapped inside of a context to be applied to a value inside of a context, returning the result inside
of the same context.Modifier and Type | Method and Description |
---|---|
<U> Applicative<TYPE,List<T1>,U> |
ap(Kind2<TYPE,List<T1>,? extends Function<? super T2,? extends U>> f)
Applies a function wrapped inside of an
Applicative , f, to a value inside of this
Applicative . |
<U> Applicative<TYPE,T1,U> |
map(Function<? super T2,? extends U> f)
Applies a function
f to the components of this Functor. |
<U> Applicative<TYPE,List<T1>,U> ap(Kind2<TYPE,List<T1>,? extends Function<? super T2,? extends U>> f)
Applicative
, f, to a value inside of this
Applicative
.U
- type of the result from this mappingf
- an Applicative
containing a function which maps this valueApplicative
containing either an error, or the result of the mappingCopyright © 2016. All Rights Reserved.