
9 Jan
2006
9 Jan
'06
2:33 p.m.
Adrian Hey wrote:
It'd be worth a look at to see what functions this provides that weren't provided by the old FiniteMap implementation, and whether or not these are still absent from Data.Map (I believe this was the original motivation for FGL having it's own private implementation in the first place).
splitFM :: Ord a => FiniteMap a b -> a -> Maybe (FiniteMap a b, (a, b)) combines delFrom and lookup splitMinFM :: Ord a => FiniteMap a b -> Maybe (FiniteMap a b, (a, b)) combines splitFM and minFM The above two are special. splitFM could be expressed using Data.Map.updateLookupWithKey (with one traversal), I think. splitMinFM corresponds to Data.Map.deleteFindMin Christian