A | |
| append [List] |
Catenate two lists.
|
| assoc [List] | assoc a l returns the value associated with key a in the list of
pairs l.
|
| assq [List] |
Same as
List.assoc, but uses physical equality instead of structural
equality to compare keys.
|
C | |
| combine [List] |
Transform a pair of lists into a list of pairs:
combine [a1; ...; an] [b1; ...; bn] is
[(a1,b1); ...; (an,bn)].
|
| concat [List] |
Concatenate a list of lists.
|
E | |
| exists [List] | exists p [a1; ...; an] checks if at least one element of
the list satisfies the predicate p.
|
| exists2 [List] |
Same as
List.exists, but for a two-argument predicate.
|
F | |
| fast_sort [List] |
Same as
List.sort or List.stable_sort, whichever is faster
on typical input.
|
| filter [List] | filter p l returns all the elements of the list l
that satisfy the predicate p.
|
| find [List] | find p l returns the first element of the list l
that satisfies the predicate p.
|
| find_all [List] | find_all is another name for List.filter.
|
| flatten [List] |
Same as
concat.
|
| fold_left [List] | List.fold_left f a [b1; ...; bn] is
f (... (f (f a b1) b2) ...) bn.
|
| fold_left2 [List] | List.fold_left2 f a [b1; ...; bn] [c1; ...; cn] is
f (... (f (f a b1 c1) b2 c2) ...) bn cn.
|
| fold_right [List] | List.fold_right f [a1; ...; an] b is
f a1 (f a2 (... (f an b) ...)).
|
| fold_right2 [List] | List.fold_right2 f [a1; ...; an] [b1; ...; bn] c is
f a1 b1 (f a2 b2 (... (f an bn c) ...)).
|
| for_all [List] | for_all p [a1; ...; an] checks if all elements of the list
satisfy the predicate p.
|
| for_all2 [List] |
Same as
List.for_all, but for a two-argument predicate.
|
H | |
| hd [List] |
Return the first element of the given list.
|
I | |
| iter [List] | List.iter f [a1; ...; an] applies function f in turn to
a1; ...; an.
|
| iter2 [List] | List.iter2 f [a1; ...; an] [b1; ...; bn] calls in turn
f a1 b1; ...; f an bn.
|
L | |
| length [List] |
Return the length (number of elements) of the given list.
|
M | |
| map [List] | List.map f [a1; ...; an] applies function f to a1, ..., an,
and builds the list [f a1; ...; f an]
with the results returned by f.
|
| map2 [List] | List.map2 f [a1; ...; an] [b1; ...; bn] is
[f a1 b1; ...; f an bn].
|
| mem [List] | mem a l is true if and only if a is equal
to an element of l.
|
| mem_assoc [List] |
Same as
List.assoc, but simply return true if a binding exists,
and false if no bindings exist for the given key.
|
| mem_assq [List] |
Same as
List.mem_assoc, but uses physical equality instead of
structural equality to compare keys.
|
| memq [List] |
Same as
List.mem, but uses physical equality instead of structural
equality to compare list elements.
|
| merge [List] |
Merge two lists:
Assuming that
l1 and l2 are sorted according to the
comparison function cmp, merge cmp l1 l2 will return a
sorted list containting all the elements of l1 and l2.
|
N | |
| nth [List] |
Return the n-th element of the given list.
|
P | |
| partition [List] | partition p l returns a pair of lists (l1, l2), where
l1 is the list of all the elements of l that
satisfy the predicate p, and l2 is the list of all the
elements of l that do not satisfy p.
|
R | |
| remove_assoc [List] | remove_assoc a l returns the list of
pairs l without the first pair with key a, if any.
|
| remove_assq [List] |
Same as
List.remove_assoc, but uses physical equality instead
of structural equality to compare keys.
|
| rev [List] |
List reversal.
|
| rev_append [List] | List.rev_append l1 l2 reverses l1 and concatenates it to l2.
|
| rev_map [List] | |
| rev_map2 [List] | |
S | |
| sort [List] |
Sort a list in increasing order according to a comparison
function.
|
| split [List] |
Transform a list of pairs into a pair of lists:
split [(a1,b1); ...; (an,bn)] is ([a1; ...; an], [b1; ...; bn]).
|
| stable_sort [List] |
Same as
List.sort, but the sorting algorithm is guaranteed to
be stable (i.e.
|
T | |
| tl [List] |
Return the given list without its first element.
|