ListSet Module
Functions and values
Function or value |
Description
|
Full Usage:
contains f x l
Parameters:
'a -> 'b -> bool
x : 'a
l : 'b list
Returns: bool
Modifiers: inline Type parameters: 'a, 'b |
|
Full Usage:
equals f l1 l2
Parameters:
'a -> 'b -> bool
l1 : 'a list
l2 : 'b list
Returns: bool
|
|
Full Usage:
findIndex eq x l
Parameters:
'a -> 'b -> bool
x : 'b
l : 'a list
Returns: int
|
NOTE: O(n)!
|
Full Usage:
hasDuplicates f l
Parameters:
'a -> 'a -> bool
l : 'a list
Returns: bool
|
|
Full Usage:
insert f x l
Parameters:
'a -> 'a -> bool
x : 'a
l : 'a list
Returns: 'a list
|
NOTE: O(n)!
|
Full Usage:
intersect f l1 l2
Parameters:
'a -> 'b -> bool
l1 : 'b list
l2 : 'a list
Returns: 'a list
|
NOTE: not tail recursive!
|
Full Usage:
isSubsetOf f l1 l2
Parameters:
'a -> 'b -> bool
l1 : 'a list
l2 : 'b list
Returns: bool
|
|
Full Usage:
isSupersetOf f l1 l2
Parameters:
'a -> 'b -> bool
l1 : 'a list
l2 : 'b list
Returns: bool
|
|
Full Usage:
remove f x l
Parameters:
'a -> 'b -> bool
x : 'a
l : 'b list
Returns: 'b list
|
|
Full Usage:
setify f l
Parameters:
'a -> 'a -> bool
l : 'a list
Returns: 'a list
|
Note: if duplicates appear, keep the ones toward the _front_ of the list
|
Full Usage:
subtract f l1 l2
Parameters:
'a -> 'b -> bool
l1 : 'a list
l2 : 'b list
Returns: 'a list
|
NOTE: quadratic!
|
Full Usage:
unionFavourLeft f l1 l2
Parameters:
'a -> 'a -> bool
l1 : 'a list
l2 : 'a list
Returns: 'a list
|
|
Full Usage:
unionFavourRight f l1 l2
Parameters:
'a -> 'a -> bool
l1 : 'a list
l2 : 'a list
Returns: 'a list
|
|