[Haskell-cafe] Re: Can we come out of a monad?

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Fri Jul 30 11:48:00 EDT 2010

Ertugrul Soeylemez <es at ertes.de> writes:

> Hello,
> it's a bit hidden in Haskell, but a monad instance consists of three
> functions:
>   fmap   :: (a -> b) -> (m a -> m b)

You don't even need fmap defined for it to be a monad, since fmap f m =
liftM f m = m >>= (return . f)

Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com

More information about the Haskell-Cafe mailing list