[Haskell-cafe] A question about monad based on http://en.wikipedia.org/wiki/Monad_(category_theory)

Gregg Reynolds dev at mobileink.com
Thu Jan 20 19:01:21 CET 2011


On Mon, Jan 17, 2011 at 9:46 PM, C K Kashyap <ckkashyap at gmail.com> wrote:

>
> I am not able to fully understand how those diagrams translate to haskell -
> I can guess that T^2 -> T referes to things like concat operation but not
> able to relate it to bind.
>
> I found it useful to work out the correspondence between monoids and
monads; lots of introductory texts on CT give the example of the category
Mon so I won't bore you with an account here.  Thinking about monoids and
monads helped me move past element-centric thinking toward the arrow-centric
way of thinking in CT.  In particular it's helpful to work out how the mu
operator of a monad (which composes arrows) is a kind of abstraction of
monoid operators (which combine elements).  What you end up with is the
monad as a device you can use to make non-monoidal things behave like
monoids - closure, associativity, identity.

For bind, google around for Kleisli Category and Kleisli star.  I think of
the latter as a kind of hybrid of a function and a functor, although I'm not
entirely sure that's correct.

-Gregg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110120/64df7a2d/attachment.htm>


More information about the Haskell-Cafe mailing list