Allows application of a function in an Applicative context to a
value in an Applicative context.
This structure is an intermediate between a functor and a monad
(technically, a strong lax monoidal functor). Compared with monads,
this interface lacks the full power of the binding operation (chain),
but it has more instances and it is sufficient for many uses.
Note that having an Applicative instance implies Functor and
Apply implementations are also available, which is why the
Applicative interface is a subtype of Functor and Apply.
Applicative implementations must obey the following laws:
Applicativefunctor type-class.Allows application of a function in an Applicative context to a value in an
Applicativecontext.This structure is an intermediate between a functor and a monad (technically, a strong lax monoidal functor). Compared with monads, this interface lacks the full power of the binding operation (
chain), but it has more instances and it is sufficient for many uses.References:
Note that having an
Applicativeinstance implies Functor and Apply implementations are also available, which is why theApplicativeinterface is a subtype ofFunctorandApply.Applicativeimplementations must obey the following laws:A.ap(A.of(x => x), v) <-> vA.ap(A.of(f), A.of(x)) <-> A.of(f(x))map(can be derived):A.map(f, u) <-> A.ap(A.of(f), u)Equivalent with the
Chaintype-class in the static-land specification.