[Haskell-cafe] General Functor and Traversable

M Farkas-Dyck strake888 at gmail.com
Sat Aug 29 07:03:15 UTC 2015

On 27/08/2015, htebalaka <goodingm at gmail.com> wrote:
> I'm not sure what the more category-theoretic version of Traversable is,
> though I don't think mapM is actually an instance of a Functor in a Kleisli
> category in the first place. Consider the Functor laws:
> mapM return = return
> mapM (f <=< g) = mapM f <=< mapM g
> It's easy to show the second law doesn't hold, as in the RHS we have to run
> all the effects from "mapM g" before any of the effects from "mapM f" can
> start, while in the LHS the effects will be interleaved.

Yes, sorry about the noise, and thanks ☺

More information about the Haskell-Cafe mailing list