
Not to mention the ugly formatting ;)
2012/9/5 Richard O'Keefe
On 4/09/2012, at 10:39 PM, Alberto G. Corona wrote:
"Monads are monoids in the category of endofunctors"
This Monoid instance for the endofunctors of the set of all elements of (m a) typematch in Haskell with FlexibleInstances:
instance Monad m => Monoid (a -> m a) where mappend = (>=>) -- kleisly operator mempty = return
The article can be found here:
http://haskell-web.blogspot.com.es/2012/07/from-monads-to-monoids-in-small.h...
I would appreciate some comments.
s/kleisly/Kleisli/ In the article, s/Lets/Let's/ /Here 'm b' as/ s/as/is/ s/this_are/this are/ s/first, is/first is/ s/haskell/Haskell/ s/polimorphic/polymorphic/ s/x=/x =/ s/let's/Let's/ s/condition, associativity/condition, associativity,/ /if not where that way, .* guess/ I *think* you mean to say something like (If it were not so, it would be impossible to define the denotational semantics of imperative languages in terms of monads, I guess.) Generally, it's "according TO", not "according WITH", and "associated WITH", not "associated TO".
instance Functor a doesn't seem to be legal Haskell.
At this point I stopped reading.