package extlib
Install
Dune Dependency
Authors
Maintainers
Sources
md5=43fb3bf2989671af1769147b1171d080
sha512=dedd2bb4a63f2df9e451dbe6aede18d873489a8675f48ded09131f2af4d00dbeaecc8750039b2e4facb9f5f9b1b01c6b7accd392bf8ac5a3f2c801562ce5c4ee
doc/extlib/RefList/index.html
Module RefList
Source
Reference 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
Functional Operations
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