Skip to content

Commit d41e12a

Browse files
committed
Fixes docs of Data.HashMap.Lazy.fromList: it takes O(n * log(n))
1 parent d52a0fd commit d41e12a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Data/HashMap/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2229,7 +2229,7 @@ toList :: HashMap k v -> [(k, v)]
22292229
toList t = Exts.build (\ c z -> foldrWithKey (curry c) z t)
22302230
{-# INLINE toList #-}
22312231

2232-
-- | \(O(n)\) Construct a map with the supplied mappings. If the list
2232+
-- | \(O(n \log n)\) Construct a map with the supplied mappings. If the list
22332233
-- contains duplicate mappings, the later mappings take precedence.
22342234
fromList :: (Eq k, Hashable k) => [(k, v)] -> HashMap k v
22352235
fromList = List.foldl' (\ m (k, v) -> unsafeInsert k v m) empty

0 commit comments

Comments
 (0)