module Use_lists: sig
.. end
Provides operations involving lists.
val length : 'a list -> int
Returns the length of a list.
val is_member : 'a * 'a list -> bool
Tests whether x is a member of the list lx given the pair (x, lx).
val map_twice : int list -> int list
Returns the list of twice each element in a list of integers.
val less_than : int -> int list
Returns the strictly decreasing list of the non-negative integers less than an integer.
val even_only : int list -> int list
Returns the sublist of the even numbers in a list of integers.
val map_length : 'a list list -> int list
Returns the list of the lengths of the elements in a list of lists.
val combine : 'a list * 'b list -> ('a * 'b) list
Transforms a pair of lists into a list of pairs.
- Both lists are assumed to have the same length.
val split : ('a * 'b) list -> 'a list * 'b list
Transforms a list of pairs into a pair of lists.
val insert : 'a * 'a list -> 'a list
Order-preserving insertion of a value into an increasing list (according to <).
val sort : 'a list -> 'a list
Sort a list in increasing order (according to <).