[commit: packages/containers] changelog-foldtree, cleaned_bugfix394, master, merge-doc-target, merge-fixes-5.9, merge-restrict-fix-5.8, revert-184-generic, revert-408-bugfix_394: Fix wrong complexity of IntMap.alter. (4634081)

git at git.haskell.org git at git.haskell.org
Mon Apr 17 21:38:29 UTC 2017


Repository : ssh://git@git.haskell.org/containers

On branches: changelog-foldtree,cleaned_bugfix394,master,merge-doc-target,merge-fixes-5.9,merge-restrict-fix-5.8,revert-184-generic,revert-408-bugfix_394
Link       : http://git.haskell.org/packages/containers.git/commitdiff/4634081498663590925938663c0223d5e02eb8ff

>---------------------------------------------------------------

commit 4634081498663590925938663c0223d5e02eb8ff
Author: Milan Straka <fox at ucw.cz>
Date:   Wed Aug 26 14:11:49 2015 +0200

    Fix wrong complexity of IntMap.alter.
    
    This resolves #165.


>---------------------------------------------------------------

4634081498663590925938663c0223d5e02eb8ff
 Data/IntMap/Strict.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Data/IntMap/Strict.hs b/Data/IntMap/Strict.hs
index 48ce1be..5165de0 100644
--- a/Data/IntMap/Strict.hs
+++ b/Data/IntMap/Strict.hs
@@ -505,7 +505,7 @@ updateLookupWithKey f0 k0 t0 = k0 `seq` toPair $ go f0 k0 t0
 
 
 
--- | /O(log n)/. The expression (@'alter' f k map@) alters the value @x@ at @k@, or absence thereof.
+-- | /O(min(n,W))/. The expression (@'alter' f k map@) alters the value @x@ at @k@, or absence thereof.
 -- 'alter' can be used to insert, delete, or update a value in an 'IntMap'.
 -- In short : @'lookup' k ('alter' f k m) = f ('lookup' k m)@.
 alter :: (Maybe a -> Maybe a) -> Key -> IntMap a -> IntMap a



More information about the ghc-commits mailing list