3 ms·
Don't make the mistake of thinking that translating a type signature into written English gives a canonical description of the function. The first definition sa
by ivanbakel 8y ago
Don't make the mistake of thinking that translating a type signature into written English gives a canonical description of the function. The first definition says "(a -> b) -> f a -> f b" - that is it.
You can translate one into the other easily
map' :: (a -> b) -> f a -> f b
map' i j = map'' j i
map'' :: f a -> (a -> b) -> f b
map'' m n = map' n m
- majewsky 8y agoOr, more succinctly, map' = flip map'' map'' = flip map'