We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51ef2cf commit c83961fCopy full SHA for c83961f
containers/src/Data/IntMap/Internal.hs
@@ -575,7 +575,9 @@ null Nil = True
575
null _ = False
576
{-# INLINE null #-}
577
578
--- | \(O(n)\). Number of elements in the map.
+-- | \(O(n)\). Number of entries in the map.
579
+--
580
+-- __Note__: Unlike @Data.Map.'Data.Map.Lazy.size'@, this is /not/ \(O(1)\).
581
--
582
-- > size empty == 0
583
-- > size (singleton 1 'a') == 1
containers/src/Data/IntSet/Internal.hs
@@ -360,6 +360,8 @@ null _ = False
360
361
-- | \(O(n)\). Cardinality of the set.
362
363
+-- __Note__: Unlike @Data.Set.'Data.Set.size'@, this is /not/ \(O(1)\).
364
365
-- See also: 'compareSize'
366
size :: IntSet -> Int
367
size = go 0
0 commit comments