Skip to content

Commit 2c44e9d

Browse files
Clarify semantics of Data.Set.difference in Haddock (#747)
* Clarify semantics of Data.Set.difference in Haddock in the same way done for Data.Map.difference * Tweak haddocks formatting Co-authored-by: Simon Jakobi <[email protected]>
1 parent a885c90 commit 2c44e9d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

containers/src/Data/Set/Internal.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,10 @@ union t1@(Bin _ x l1 r1) t2 = case splitS x t2 of
850850
Difference
851851
--------------------------------------------------------------------}
852852
-- | /O(m*log(n\/m + 1)), m <= n/. Difference of two sets.
853+
--
854+
-- Return elements of the first set not existing in the second set.
855+
--
856+
-- > difference (fromList [5, 3]) (fromList [5, 7]) == singleton 3
853857
difference :: Ord a => Set a -> Set a -> Set a
854858
difference Tip _ = Tip
855859
difference t1 Tip = t1

0 commit comments

Comments
 (0)