Another problem is have is to filter entries in a map. If I have a map

Ord k => Map k [a]

(essentially, which combines data with the same key into a list)

and I have a predicte  (k,a) -> Bool

(which takes the key and one element in its list and checks it)

and I need to regenerate the map, what would be a good way to do that?