Free monads and their algebras

Posted April 17, 2012 by Maciej Piróg
Categories: Algebra

Today we are interested in the following theorem: The category of algebras of an endofunctor is isomorphic to the category of algebras of its free monad. It sounds complicated (and is rather not precise), so let me explain:

Read the rest of this post »

Are idiom morphisms monad morphisms?

Posted March 10, 2012 by Maciej Piróg
Categories: Algebra, Haskell

During the last Algebra of Programming meeting we were talking about idioms (applicative functors), monads, traversals, and such. At one moment a definition of idiom morphism appeared on the whiteboard, which is a function (a brave person might even say `natural transformation’) of type (for applicative M and N)

f :: M a -> N a

which respects the following:

f . pure = pure
f (mf <*> mx) = f mf <*> f mx

I was wondering: Sometimes it is the case that homomorphisms of simpler algebraic structures (for example, monoids) are authomatically homomorphisms of more complicated structures (for example, groups).

Read the rest of this post »


Follow

Get every new post delivered to your Inbox.