ap<N1> method
Derive ap
from flatMap
.
Use flatMap
to extract the value from a
and from the current Monad.
If both these values are present, apply the function from a
to the value
of the current Monad, using pure
to return the correct type.
Implementation
@override
HKT3<KT, P1, P2, N1> ap<N1>(
covariant Monad3<KT, P1, P2, N1 Function(P3)> a) =>
a.flatMap((f) => flatMap((v) => pure(f(v))));