Re:Haskell for Web Developers
by dllthomas on Friday July 26, 2013 @09:33PM
(#6111482)
It's called lifting because it's moving something between levels. In the case of liftM, it's moving a function that operates on type a and returns type b, to one that operates on a wrapped type a and returns a wrapped type b. Since a monad should be a functor, and the types are the same, I'm pretty confident that this is the same thing as fmap - though in principle there could be a monad with no functor instance defined where you would have to use liftM (for now: http://www.haskell.org/haskellwiki/Functor-Applicative-Monad...).
[ Parent
| on HN ]
There are no comments on this comment yet.