I want to delete all element from a Data.Map which match a particular condition. Let says foobar is this function, here is his needed behavior :
foobar :: (a -> Bool) -> Map k a -> Map k a
foobar (>= 20) $ fromList [("john",3),("sasha",8),("mary",33),("philip",20)]
-- the expected result is fromList [("john",3),("sasha",8)]
thanks for any reply !
Data.Map.filter
In the future, you can use Hoogle to answer these questions.