
23 Mar
2015
23 Mar
'15
11:56 p.m.
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.