Quantcast
Channel: Do the monadic liftM and the functorial fmap have to be equivalent? - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by luqui for Do the monadic liftM and the functorial fmap have to be...

What you have missed is the parametericity law, otherwise known as the free theorem. One of the consequences of parametricity is that all polymorphic functions are natural transformations. Naturality...

View Article



Answer by chi for Do the monadic liftM and the functorial fmap have to be...

For this exercise, I found it easier to work with join rather than >>=. A monad can be equivalently defined through return and join, satisfying1) join . join = join . fmap join2) join . return =...

View Article

Do the monadic liftM and the functorial fmap have to be equivalent?

(Note: I'm phrasing the question using Haskell terminology; answers are welcome to use the same terminology and/or the mathematical language of category theory, including proper mathematical...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images