mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
📝 liveDifference.
This commit is contained in:
parent
31a561751c
commit
06be77e006
@ -26,6 +26,7 @@ liveInsert addr = Live . Set.insert addr . unLive
|
|||||||
liveDelete :: Ord l => Address l v -> Live l v -> Live l v
|
liveDelete :: Ord l => Address l v -> Live l v -> Live l v
|
||||||
liveDelete addr = Live . Set.delete addr . unLive
|
liveDelete addr = Live . Set.delete addr . unLive
|
||||||
|
|
||||||
|
-- | Compute the (asymmetric) difference of two 'Live' sets, i.e. delete every element of the second set from the first set.
|
||||||
liveDifference :: Ord l => Live l v -> Live l v -> Live l v
|
liveDifference :: Ord l => Live l v -> Live l v -> Live l v
|
||||||
liveDifference = fmap Live . (Set.difference `on` unLive)
|
liveDifference = fmap Live . (Set.difference `on` unLive)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user