-- | Maps a function over the keys
-- 
-- The supplied function must be bijective with regards to k1 and k2, so it doesn't matter if a lot of values get mapped to Nothing. Also the domain of k1 should be as small as possible.
mapKeysR' :: (Enum k1, Eq k2) => (k1 -> Maybe k2) -> FunMap k1 v -> FunMap k2 v
mapKeysR' g (FunMap f) = FunMap (invertFunction' g >=> f)
mapKeysR' :: (Enum k1, Eq k2) => (k1 -> Maybe k2) -> FunMap k1 v -> FunMap k2 v
mapKeysR' g (FunMap f) = FunMap (invertFunction' g >=> f)
mapKeysR' g (FunMap f) = FunMap (invertFunction' g >=> f)