Several Traversable instances have an extra fmap
For example, we define
instance Traversable ZipList where traverse f (ZipList xs) = ZipList <$> traverse f xs
If the list is very short, the extra
fmap could be bad. We can fix this by inlining the inner
traverse. However, I suspect a better approach would be to add a method to
mapTraverse :: Applicative f => (t b -> r) -> (a -> f b) -> t a -> f r mapTraverse p f xs = p <$> traverse f xs
but I need to work through whether this is enough power to solve enough problems.