mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 00:35:25 +03:00
Improve docs for DA.Next.Set.difference (#6544)
changelog_begin changelog_end
This commit is contained in:
parent
6213f560ef
commit
5c0cfcc254
@ -96,7 +96,11 @@ union (Set t1) (Set t2) = Set $ TextMap.union t1 t2
|
||||
intersection : MapKey a => Set a -> Set a -> Set a
|
||||
intersection s1 s2 = filter (`member` s2) s1
|
||||
|
||||
-- | Difference of two sets.
|
||||
-- | `difference x y` returns the set consisting of all
|
||||
-- elements in `x` that are not in `y`.
|
||||
--
|
||||
-- >>> fromList [1, 2, 3] `difference` fromList [1, 4]
|
||||
-- fromList [2, 3]
|
||||
difference : MapKey a => Set a -> Set a -> Set a
|
||||
difference s1 s2 = filter (\x -> not (x `member` s2)) s1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user