[Haskell-cafe] Applicative of Applicative

Nikita Volkov nikita.y.volkov at gmail.com
Tue Mar 24 03:56:54 UTC 2015

> Have you considered making Temporal a Monad? All monads by definition
> provide a `join :: m (m a) -> m a` which flattens their nested
> structure.

Actually `join` is exactly the operation that makes the difference between
Monad and Applicative Functor. Monad's binding operation can easily be
defined using a combination of `join` and `fmap`:

(>>=) m f = join (fmap f m)

So my bet is that the answer to the OP's question lies in Monad.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150324/26187400/attachment.html>

More information about the Haskell-Cafe mailing list