Assumes that the arguments contain no duplicates
Moduleghc-9.10.3GHC2021
GHC.Data.List.SetOps
Set-like operations on lists
Avoid using them as much as possible
- 1 type
- 17 values
- Packageghc-9.10.3
- Exports18
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourceSetOps.hs
Combines the two lists while keeping their order, placing the first argument first in the result.
Uses a set internally to record duplicates. This makes it slightly slower for very small lists but avoids quadratic behaviour for large lists.
Calculate the set difference of two lists. This is O((m + n) log n), where we subtract a list of n elements from a list of m elements.
Extremely short cases are handled specially: When m or n is 0, this takes O(1) time. When m is 1, it takes O(n) time.
A finite mapping based on equality and association lists.
Lookup key, fail gracefully using Nothing if not found.
Remove the duplicates from a list using the provided comparison function. Might change the order of elements.
Returns the list without duplicates, and accumulates all the duplicates in the second component of its result.
Remove the duplicates from a list using the provided comparison function.