[Haskell-cafe] What are "free" Monads?
pumpkingod at gmail.com
Sat Feb 27 04:06:18 EST 2010
Given any functor you can get a monad for free!
data Free f a = Either a (f (Free f a))
Not sure about unfree, but there are cofree comonads that are pretty closely
related, and give you a comonad given a functor:
data Cofree f a = (a, f (Cofree f a))
I'm sure the more categorically minded can tell you way more.
Hope this helps,
2010/2/27 Günther Schmidt <gue.schmidt at web.de>
> I see the term "free monad" quite a lot, but don't really see an
> explanation what a free monad is. What sets a monad free and why in this day
> and age are there unfree monads?
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe