Quantcast
Channel: Can liftM differ from liftA? - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Martijn for Can liftM differ from liftA?

They can differ, but they shouldn't.They can differ because they can have different implementations: one is defined in an instance Applicative while the other is defined in an instance Monad. But if...

View Article



Answer by Apocalisp for Can liftM differ from liftA?

liftA, liftM, fmap, and .should all be the same function, and they must be if they satisfy the functor law:fmap id = idHowever, this is not checked by Haskell.Now for Applicative. It's possible for ap...

View Article

Can liftM differ from liftA?

According to the Typeclassopedia (among other sources), Applicative logically belongs between Monad and Pointed (and thus Functor) in the type class hierarchy, so we would ideally have something like...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images