monadic map functor

1
2
3
4
5
instance Ord a => F (M.Map a) where
    fmap' f x = M.fromList $ do
      (a,b) <- M.toList x
      let b' = f b
      return (a,b')