When storing data in a Map
, I was recently looking for a Bitraversable
instance, since I wanted to traverse over both keys and values. To my surprise, I found out that Map
does not even have a Bifunctor
instance, even though implementations for both first
(mapKeys
) and second
(map
) exist.
Is there a specific reason for this or was this decision just made to minimize dependencies?
Thanks
The implementation for
left
(did you actually meanfirst
? I'm going to writeleft
instead offirst
everywhere) does not exist, becausemapKeys
has a constraint:left
must work for any pair of typesk1
andk2
.