RefListSourceReference on lists.
RefList is a extended set of functions that manipulate list references.
Adds an element in a sorted list, using optional comparator or 'compare' as default.
Returns the last element - O(n) or raises Empty_list if the ref list is empty
Removes and returns the first element or raises Empty_list if the ref list is empty
Removes and returns the n first elements or raises Empty_list if the ref list does not contain enough elements
Returns a ref list containing the same elements but without the first one or raises Empty_list if the ref list is empty
Apply the given function to all elements of the ref list, in respect with the order of the list
Find the first element matching the specified predicate raise Not_found if no element is found
Find the first element in the reversed ref list matching the specified predicate raise Not_found if no element is found
Same as find but takes an exception to be raised when no element is found as additional parameter
Return true if an element matches the specified predicate
Return true if all elements match the specified predicate
Apply a function to all elements and return the ref list constructed with the function returned values
transform all elements in the ref list using a function.
Apply a function to all elements and return the list constructed with the function returned values
Sort elements using the specified comparator or compare as default comparator
Remove all elements that do not match the specified predicate
Remove an element from the ref list raise Not_found if the element is not found
Remove the first element matching the specified predicate raise Not_found if no element has been removed
Remove all elements equal to the specified element from the ref list