Skip to content

Commit 4634081

Browse files
committed
Fix wrong complexity of IntMap.alter.
This resolves #165.
1 parent 32df5aa commit 4634081

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Data/IntMap/Strict.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ updateLookupWithKey f0 k0 t0 = k0 `seq` toPair $ go f0 k0 t0
505505

506506

507507

508-
-- | /O(log n)/. The expression (@'alter' f k map@) alters the value @x@ at @k@, or absence thereof.
508+
-- | /O(min(n,W))/. The expression (@'alter' f k map@) alters the value @x@ at @k@, or absence thereof.
509509
-- 'alter' can be used to insert, delete, or update a value in an 'IntMap'.
510510
-- In short : @'lookup' k ('alter' f k m) = f ('lookup' k m)@.
511511
alter :: (Maybe a -> Maybe a) -> Key -> IntMap a -> IntMap a

0 commit comments

Comments
 (0)