[Haskell-cafe] A question about monad based on http://en.wikipedia.org/wiki/Monad_(category_theory)
C K Kashyap
ckkashyap at gmail.com
Tue Jan 18 04:46:06 CET 2011
I was going through http://en.wikipedia.org/wiki/Monad_(category_theory) -
under Formal Definition I notice that monad is a Functor T:C -> C
My question is - when we think of Maybe as a functor T:C -> C .... should we
think that C here refers to Hakell types? As in,
(Int and Maybe Int are objects in C) and (Int -> Int and Maybe Int -> Maybe
Int are arrows in C) and T is an arrow between them. Is that right? For some
reason, I was
imagining them as two different categories C and D.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe