This type-class is exposed in addition to Applicative because
there are data types for which we can't implement of, but
that could still benefit from an ap definition. For example
in case of a Map<K, ?> we couldn't define pure for it
because we don't have a K key.
Must obey this law:
Composition: A.ap(A.ap(A.map(f => g => x => f(g(x)), a), u), v) <-> A.ap(a, A.ap(u, v))
Equivalent with the Apply type-class in the
static-land
specification.
Weaker version of Applicative.
This type-class is exposed in addition to
Applicative
because there are data types for which we can't implementof
, but that could still benefit from anap
definition. For example in case of aMap<K, ?>
we couldn't definepure
for it because we don't have aK
key.Must obey this law:
A.ap(A.ap(A.map(f => g => x => f(g(x)), a), u), v) <-> A.ap(a, A.ap(u, v))
Equivalent with the
Apply
type-class in the static-land specification.