Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > bbe04b8395a5a03f2446c6fb72b617f0 > files > 79

ocaml-extlib-1.7.5-3.mga7.armv7hl.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link rel="previous" href="PMap.html">
<link rel="next" href="Std.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Base64" rel="Chapter" href="Base64.html">
<link title="BitSet" rel="Chapter" href="BitSet.html">
<link title="Dllist" rel="Chapter" href="Dllist.html">
<link title="DynArray" rel="Chapter" href="DynArray.html">
<link title="Enum" rel="Chapter" href="Enum.html">
<link title="ExtArray" rel="Chapter" href="ExtArray.html">
<link title="ExtBuffer" rel="Chapter" href="ExtBuffer.html">
<link title="ExtBytes" rel="Chapter" href="ExtBytes.html">
<link title="ExtHashtbl" rel="Chapter" href="ExtHashtbl.html">
<link title="ExtLib" rel="Chapter" href="ExtLib.html">
<link title="ExtList" rel="Chapter" href="ExtList.html">
<link title="ExtString" rel="Chapter" href="ExtString.html">
<link title="Global" rel="Chapter" href="Global.html">
<link title="IO" rel="Chapter" href="IO.html">
<link title="OptParse" rel="Chapter" href="OptParse.html">
<link title="Option" rel="Chapter" href="Option.html">
<link title="PMap" rel="Chapter" href="PMap.html">
<link title="RefList" rel="Chapter" href="RefList.html">
<link title="Std" rel="Chapter" href="Std.html">
<link title="UChar" rel="Chapter" href="UChar.html">
<link title="UTF8" rel="Chapter" href="UTF8.html">
<link title="Unzip" rel="Chapter" href="Unzip.html"><link title="Functional Operations" rel="Section" href="#6_FunctionalOperations">
<title>RefList</title>
</head>
<body>
<div class="navbar"><a class="pre" href="PMap.html" title="PMap">Previous</a>
&nbsp;<a class="up" href="index.html" title="Index">Up</a>
&nbsp;<a class="post" href="Std.html" title="Std">Next</a>
</div>
<h1>Module <a href="type_RefList.html">RefList</a></h1>

<pre><span id="MODULERefList"><span class="keyword">module</span> RefList</span>: <code class="code">sig</code> <a href="RefList.html">..</a> <code class="code">end</code></pre><div class="info module top">
<div class="info-desc">
<p>Reference on lists.</p>

<p>RefList is a extended set of functions that manipulate list
  references.</p>
</div>
</div>
<hr width="100%">

<pre><span id="EXCEPTIONEmpty_list"><span class="keyword">exception</span> Empty_list</span></pre>

<pre><span id="EXCEPTIONInvalid_index"><span class="keyword">exception</span> Invalid_index</span> <span class="keyword">of</span> <code class="type">int</code></pre>

<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type">'a</code> t</span> </pre>


<pre><span id="VALempty"><span class="keyword">val</span> empty</span> : <code class="type">unit -> 'a <a href="RefList.html#TYPEt">t</a></code></pre><div class="info ">
<div class="info-desc">
<p>Returns a new empty ref list</p>
</div>
</div>

<pre><span id="VALis_empty"><span class="keyword">val</span> is_empty</span> : <code class="type">'a <a href="RefList.html#TYPEt">t</a> -> bool</code></pre><div class="info ">
<div class="info-desc">
<p>Return <code class="code">true</code> if a ref list is empty</p>
</div>
</div>

<pre><span id="VALclear"><span class="keyword">val</span> clear</span> : <code class="type">'a <a href="RefList.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
<div class="info-desc">
<p>Removes all elements</p>
</div>
</div>

<pre><span id="VALlength"><span class="keyword">val</span> length</span> : <code class="type">'a <a href="RefList.html#TYPEt">t</a> -> int</code></pre><div class="info ">
<div class="info-desc">
<p>Returns the number of elements - O(n)</p>
</div>
</div>

<pre><span id="VALcopy"><span class="keyword">val</span> copy</span> : <code class="type">dst:'a <a href="RefList.html#TYPEt">t</a> -> src:'a <a href="RefList.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
<div class="info-desc">
<p>Makes a copy of a ref list - O(1)</p>
</div>
</div>

<pre><span id="VALcopy_list"><span class="keyword">val</span> copy_list</span> : <code class="type">dst:'a <a href="RefList.html#TYPEt">t</a> -> src:'a list -> unit</code></pre><div class="info ">
<div class="info-desc">
<p>Makes a copy of a list - O(1)</p>
</div>
</div>

<pre><span id="VALcopy_enum"><span class="keyword">val</span> copy_enum</span> : <code class="type">dst:'a <a href="RefList.html#TYPEt">t</a> -> src:'a <a href="Enum.html#TYPEt">Enum.t</a> -> unit</code></pre><div class="info ">
<div class="info-desc">
<p>Makes a copy of a enum</p>
</div>
</div>

<pre><span id="VALof_list"><span class="keyword">val</span> of_list</span> : <code class="type">'a list -> 'a <a href="RefList.html#TYPEt">t</a></code></pre><div class="info ">
<div class="info-desc">
<p>Creates a ref list from a list - O(1)</p>
</div>
</div>

<pre><span id="VALto_list"><span class="keyword">val</span> to_list</span> : <code class="type">'a <a href="RefList.html#TYPEt">t</a> -> 'a list</code></pre><div class="info ">
<div class="info-desc">
<p>Returns the current elements as a list - O(1)</p>
</div>
</div>

<pre><span id="VALof_enum"><span class="keyword">val</span> of_enum</span> : <code class="type">'a <a href="Enum.html#TYPEt">Enum.t</a> -> 'a <a href="RefList.html#TYPEt">t</a></code></pre><div class="info ">
<div class="info-desc">
<p>Creates a ref list from an enumeration</p>
</div>
</div>

<pre><span id="VALenum"><span class="keyword">val</span> enum</span> : <code class="type">'a <a href="RefList.html#TYPEt">t</a> -> 'a <a href="Enum.html#TYPEt">Enum.t</a></code></pre><div class="info ">
<div class="info-desc">
<p>Returns an enumeration of current elements in the ref list</p>
</div>
</div>

<pre><span id="VALadd"><span class="keyword">val</span> add</span> : <code class="type">'a <a href="RefList.html#TYPEt">t</a> -> 'a -> unit</code></pre><div class="info ">
<div class="info-desc">
<p>Adds an element at the end - O(n)</p>
</div>
</div>

<pre><span id="VALpush"><span class="keyword">val</span> push</span> : <code class="type">'a <a href="RefList.html#TYPEt">t</a> -> 'a -> unit</code></pre><div class="info ">
<div class="info-desc">
<p>Adds an element at the head - O(1)</p>
</div>
</div>

<pre><span id="VALadd_sort"><span class="keyword">val</span> add_sort</span> : <code class="type">?cmp:('a -> 'a -> int) -> 'a <a href="RefList.html#TYPEt">t</a> -> 'a -> unit</code></pre><div class="info ">
<div class="info-desc">
<p>Adds an element in a sorted list, using optional comparator
    or 'compare' as default.</p>
</div>
</div>

<pre><span id="VALfirst"><span class="keyword">val</span> first</span> : <code class="type">'a <a href="RefList.html#TYPEt">t</a> -> 'a</code></pre><div class="info ">
<div class="info-desc">
<p>Returns the first element or
    raises <code class="code">Empty_list</code> if the ref list is empty</p>
</div>
</div>

<pre><span id="VALlast"><span class="keyword">val</span> last</span> : <code class="type">'a <a href="RefList.html#TYPEt">t</a> -> 'a</code></pre><div class="info ">
<div class="info-desc">
<p>Returns the last element - O(n) or
    raises Empty_list if the ref list is empty</p>
</div>
</div>

<pre><span id="VALpop"><span class="keyword">val</span> pop</span> : <code class="type">'a <a href="RefList.html#TYPEt">t</a> -> 'a</code></pre><div class="info ">
<div class="info-desc">
<p>Removes and returns the first element or
   raises <code class="code">Empty_list</code> if the ref list is empty</p>
</div>
</div>

<pre><span id="VALnpop"><span class="keyword">val</span> npop</span> : <code class="type">'a <a href="RefList.html#TYPEt">t</a> -> int -> 'a list</code></pre><div class="info ">
<div class="info-desc">
<p>Removes and returns the n first elements or
   raises <code class="code">Empty_list</code> if the ref list does not
   contain enough elements</p>
</div>
</div>

<pre><span id="VALhd"><span class="keyword">val</span> hd</span> : <code class="type">'a <a href="RefList.html#TYPEt">t</a> -> 'a</code></pre><div class="info ">
<div class="info-desc">
<p>same as <code class="code">first</code></p>
</div>
</div>

<pre><span id="VALtl"><span class="keyword">val</span> tl</span> : <code class="type">'a <a href="RefList.html#TYPEt">t</a> -> 'a <a href="RefList.html#TYPEt">t</a></code></pre><div class="info ">
<div class="info-desc">
<p>Returns a ref list containing the same elements
    but without the first one or
    raises <code class="code">Empty_list</code> if the ref list is empty</p>
</div>
</div>

<pre><span id="VALrev"><span class="keyword">val</span> rev</span> : <code class="type">'a <a href="RefList.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
<div class="info-desc">
<p>Reverses the ref list - O(n)</p>
</div>
</div>
<h7 id="6_FunctionalOperations">Functional Operations</h7>
<pre><span id="VALiter"><span class="keyword">val</span> iter</span> : <code class="type">('a -> unit) -> 'a <a href="RefList.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
<div class="info-desc">
<p>Apply the given function to all elements of the
    ref list, in respect with the order of the list</p>
</div>
</div>

<pre><span id="VALfind"><span class="keyword">val</span> find</span> : <code class="type">('a -> bool) -> 'a <a href="RefList.html#TYPEt">t</a> -> 'a</code></pre><div class="info ">
<div class="info-desc">
<p>Find the first element matching
    the specified predicate
    raise <code class="code">Not_found</code> if no element is found</p>
</div>
</div>

<pre><span id="VALrfind"><span class="keyword">val</span> rfind</span> : <code class="type">('a -> bool) -> 'a <a href="RefList.html#TYPEt">t</a> -> 'a</code></pre><div class="info ">
<div class="info-desc">
<p>Find the first element in the reversed ref list matching
    the specified predicate
    raise <code class="code">Not_found</code> if no element is found</p>
</div>
</div>

<pre><span id="VALfind_exc"><span class="keyword">val</span> find_exc</span> : <code class="type">('a -> bool) -> exn -> 'a <a href="RefList.html#TYPEt">t</a> -> 'a</code></pre><div class="info ">
<div class="info-desc">
<p>Same as find but takes an exception to be raised when
    no element is found as additional parameter</p>
</div>
</div>

<pre><span id="VALexists"><span class="keyword">val</span> exists</span> : <code class="type">('a -> bool) -> 'a <a href="RefList.html#TYPEt">t</a> -> bool</code></pre><div class="info ">
<div class="info-desc">
<p>Return <code class="code">true</code> if an element matches the specified
    predicate</p>
</div>
</div>

<pre><span id="VALfor_all"><span class="keyword">val</span> for_all</span> : <code class="type">('a -> bool) -> 'a <a href="RefList.html#TYPEt">t</a> -> bool</code></pre><div class="info ">
<div class="info-desc">
<p>Return <code class="code">true</code> if all elements match the specified
    predicate</p>
</div>
</div>

<pre><span id="VALmap"><span class="keyword">val</span> map</span> : <code class="type">('a -> 'b) -> 'a <a href="RefList.html#TYPEt">t</a> -> 'b <a href="RefList.html#TYPEt">t</a></code></pre><div class="info ">
<div class="info-desc">
<p>Apply a function to all elements
    and return the ref list constructed with
    the function returned values</p>
</div>
</div>

<pre><span id="VALtransform"><span class="keyword">val</span> transform</span> : <code class="type">('a -> 'a) -> 'a <a href="RefList.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
<div class="info-desc">
<p>transform all elements in the ref list
    using a function.</p>
</div>
</div>

<pre><span id="VALmap_list"><span class="keyword">val</span> map_list</span> : <code class="type">('a -> 'b) -> 'a <a href="RefList.html#TYPEt">t</a> -> 'b list</code></pre><div class="info ">
<div class="info-desc">
<p>Apply a function to all elements
    and return the list constructed with
    the function returned values</p>
</div>
</div>

<pre><span id="VALsort"><span class="keyword">val</span> sort</span> : <code class="type">?cmp:('a -> 'a -> int) -> 'a <a href="RefList.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
<div class="info-desc">
<p>Sort elements using the specified comparator
    or compare as default comparator</p>
</div>
</div>

<pre><span id="VALfilter"><span class="keyword">val</span> filter</span> : <code class="type">('a -> bool) -> 'a <a href="RefList.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
<div class="info-desc">
<p>Remove all elements that do not match the
    specified predicate</p>
</div>
</div>

<pre><span id="VALremove"><span class="keyword">val</span> remove</span> : <code class="type">'a <a href="RefList.html#TYPEt">t</a> -> 'a -> unit</code></pre><div class="info ">
<div class="info-desc">
<p>Remove an element from the ref list
    raise <code class="code">Not_found</code> if the element is not found</p>
</div>
</div>

<pre><span id="VALremove_if"><span class="keyword">val</span> remove_if</span> : <code class="type">('a -> bool) -> 'a <a href="RefList.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
<div class="info-desc">
<p>Remove the first element matching the
    specified predicate
    raise <code class="code">Not_found</code> if no element has been removed</p>
</div>
</div>

<pre><span id="VALremove_all"><span class="keyword">val</span> remove_all</span> : <code class="type">'a <a href="RefList.html#TYPEt">t</a> -> 'a -> unit</code></pre><div class="info ">
<div class="info-desc">
<p>Remove all elements equal to the specified
    element from the ref list</p>
</div>
</div>

<pre><span id="MODULEIndex"><span class="keyword">module</span> <a href="RefList.Index.html">Index</a></span>: <code class="code">sig</code> <a href="RefList.Index.html">..</a> <code class="code">end</code></pre><div class="info">
<p>Functions that operate on the <code class="code">i</code>th element of a list.</p>

</div>
</body></html>