
30 Jul
2010
30 Jul
'10
11:48 a.m.
Ertugrul Soeylemez
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@gmail.com IvanMiljenovic.wordpress.com