KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
According to this question the 2nd Functor law is implied by the 1st in Haskell: 1st Law: fmap id = id 2nd Law : fmap (g . h) = (fmap g) . (fmap h) Is the reverse true? Starting from 2nd law, and setting g equal to id , can I reason the following and get the 1st law? fmap (id . h) x = (fmap id) . (fmap h) x fmap h x = (fmap id) . (fmap h) x x' = (fmap id) x' fmap id = id where x' = fmap h x
Tags (comma-separated)
Save Edits
Cancel