Header menu logo fantomas

ListSet Module

Functions and values

Function or value Description

contains f x l

Full Usage: contains f x l

Parameters:
    f : 'a -> 'b -> bool
    x : 'a
    l : 'b list

Returns: bool
Modifiers: inline
Type parameters: 'a, 'b
f : 'a -> 'b -> bool
x : 'a
l : 'b list
Returns: bool

equals f l1 l2

Full Usage: equals f l1 l2

Parameters:
    f : 'a -> 'b -> bool
    l1 : 'a list
    l2 : 'b list

Returns: bool
f : 'a -> 'b -> bool
l1 : 'a list
l2 : 'b list
Returns: bool

findIndex eq x l

Full Usage: findIndex eq x l

Parameters:
    eq : 'a -> 'b -> bool
    x : 'b
    l : 'a list

Returns: int

NOTE: O(n)!

eq : 'a -> 'b -> bool
x : 'b
l : 'a list
Returns: int

hasDuplicates f l

Full Usage: hasDuplicates f l

Parameters:
    f : 'a -> 'a -> bool
    l : 'a list

Returns: bool
f : 'a -> 'a -> bool
l : 'a list
Returns: bool

insert f x l

Full Usage: insert f x l

Parameters:
    f : 'a -> 'a -> bool
    x : 'a
    l : 'a list

Returns: 'a list

NOTE: O(n)!

f : 'a -> 'a -> bool
x : 'a
l : 'a list
Returns: 'a list

intersect f l1 l2

Full Usage: intersect f l1 l2

Parameters:
    f : 'a -> 'b -> bool
    l1 : 'b list
    l2 : 'a list

Returns: 'a list

NOTE: not tail recursive!

f : 'a -> 'b -> bool
l1 : 'b list
l2 : 'a list
Returns: 'a list

isSubsetOf f l1 l2

Full Usage: isSubsetOf f l1 l2

Parameters:
    f : 'a -> 'b -> bool
    l1 : 'a list
    l2 : 'b list

Returns: bool
f : 'a -> 'b -> bool
l1 : 'a list
l2 : 'b list
Returns: bool

isSupersetOf f l1 l2

Full Usage: isSupersetOf f l1 l2

Parameters:
    f : 'a -> 'b -> bool
    l1 : 'a list
    l2 : 'b list

Returns: bool
f : 'a -> 'b -> bool
l1 : 'a list
l2 : 'b list
Returns: bool

remove f x l

Full Usage: remove f x l

Parameters:
    f : 'a -> 'b -> bool
    x : 'a
    l : 'b list

Returns: 'b list
f : 'a -> 'b -> bool
x : 'a
l : 'b list
Returns: 'b list

setify f l

Full Usage: setify f l

Parameters:
    f : 'a -> 'a -> bool
    l : 'a list

Returns: 'a list

Note: if duplicates appear, keep the ones toward the _front_ of the list

f : 'a -> 'a -> bool
l : 'a list
Returns: 'a list

subtract f l1 l2

Full Usage: subtract f l1 l2

Parameters:
    f : 'a -> 'b -> bool
    l1 : 'a list
    l2 : 'b list

Returns: 'a list

NOTE: quadratic!

f : 'a -> 'b -> bool
l1 : 'a list
l2 : 'b list
Returns: 'a list

unionFavourLeft f l1 l2

Full Usage: unionFavourLeft f l1 l2

Parameters:
    f : 'a -> 'a -> bool
    l1 : 'a list
    l2 : 'a list

Returns: 'a list
f : 'a -> 'a -> bool
l1 : 'a list
l2 : 'a list
Returns: 'a list

unionFavourRight f l1 l2

Full Usage: unionFavourRight f l1 l2

Parameters:
    f : 'a -> 'a -> bool
    l1 : 'a list
    l2 : 'a list

Returns: 'a list
f : 'a -> 'a -> bool
l1 : 'a list
l2 : 'a list
Returns: 'a list

Type something to start searching.