-- | /O(min(n,W))/. Delete and find the maximal element.
deleteFindMax :: IntMap a -> ((Key, a), IntMap a)
deleteFindMax m = let (k, a) = findMax m
                  in ((k, a), delete k m)
deleteFindMax :: IntMap a -> ((Key, a), IntMap a)
deleteFindMax m = let (k, a) = findMax m
                  in ((k, a), delete k m)
deleteFindMax m = let (k, a) = findMax m
                  in ((k, a), delete k m)