<!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"> <link rel="Start" href="index.html"> <link rel="previous" href="ULine.html"> <link rel="next" href="UNF.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 class types" rel=Appendix href="index_class_types.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="CaseMap" rel="Chapter" href="CaseMap.html"> <link title="CharEncoding" rel="Chapter" href="CharEncoding.html"> <link title="Default" rel="Chapter" href="Default.html"> <link title="IMap" rel="Chapter" href="IMap.html"> <link title="ISet" rel="Chapter" href="ISet.html"> <link title="Locale" rel="Chapter" href="Locale.html"> <link title="Main" rel="Chapter" href="Main.html"> <link title="OOChannel" rel="Chapter" href="OOChannel.html"> <link title="SubText" rel="Chapter" href="SubText.html"> <link title="UCS4" rel="Chapter" href="UCS4.html"> <link title="UChar" rel="Chapter" href="UChar.html"> <link title="UCharInfo" rel="Chapter" href="UCharInfo.html"> <link title="UCharTbl" rel="Chapter" href="UCharTbl.html"> <link title="UCol" rel="Chapter" href="UCol.html"> <link title="ULine" rel="Chapter" href="ULine.html"> <link title="UMap" rel="Chapter" href="UMap.html"> <link title="UNF" rel="Chapter" href="UNF.html"> <link title="UPervasives" rel="Chapter" href="UPervasives.html"> <link title="URe" rel="Chapter" href="URe.html"> <link title="UReStr" rel="Chapter" href="UReStr.html"> <link title="USet" rel="Chapter" href="USet.html"> <link title="UTF16" rel="Chapter" href="UTF16.html"> <link title="UTF8" rel="Chapter" href="UTF8.html"> <link title="UText" rel="Chapter" href="UText.html"> <link title="UnicodeString" rel="Chapter" href="UnicodeString.html"> <link title="XArray" rel="Chapter" href="XArray.html"> <link title="XString" rel="Chapter" href="XString.html"><title>UMap</title> </head> <body> <div class="navbar"><a href="ULine.html">Previous</a> <a href="index.html">Up</a> <a href="UNF.html">Next</a> </div> <center><h1>Module <a href="type_UMap.html">UMap</a></h1></center> <br> <pre><span class="keyword">module</span> UMap: <code class="code">sig</code> <a href="UMap.html">..</a> <code class="code">end</code></pre>Maps over Unicode characters.<br> <hr width="100%"> <pre><span class="keyword">type</span> <a name="TYPEt"></a><code class="type">'a</code> t </pre> <pre><span class="keyword">val</span> <a name="VALempty"></a>empty : <code class="type">'a <a href="UMap.html#TYPEt">t</a></code></pre><pre><span class="keyword">val</span> <a name="VALis_empty"></a>is_empty : <code class="type">'a <a href="UMap.html#TYPEt">t</a> -> bool</code></pre><pre><span class="keyword">val</span> <a name="VALadd"></a>add : <code class="type">?eq:('a -> 'a -> bool) -> <a href="UChar.html#TYPEt">UChar.t</a> -> 'a -> 'a <a href="UMap.html#TYPEt">t</a> -> 'a <a href="UMap.html#TYPEt">t</a></code></pre><div class="info"> <code class="code">add ?eq u v m</code> returns the new map which is same to <code class="code">m</code> except it maps <code class="code">u</code> to some value <code class="code">v'</code> which satisfies <code class="code">eq v v'</code>. If <code class="code">eq</code> is not supplied, structural equality is used.<br> </div> <pre><span class="keyword">val</span> <a name="VALadd_range"></a>add_range : <code class="type">?eq:('a -> 'a -> bool) -> <a href="UChar.html#TYPEt">UChar.t</a> -> <a href="UChar.html#TYPEt">UChar.t</a> -> 'a -> 'a <a href="UMap.html#TYPEt">t</a> -> 'a <a href="UMap.html#TYPEt">t</a></code></pre><div class="info"> <code class="code">add ?eq u1 u2 v m</code> returns the new map which is same to <code class="code">m</code> except it maps characters in the range <code class="code">u1</code>-<code class="code">u2</code> to some value <code class="code">v'</code> which satisfies <code class="code">eq v v'</code>. If <code class="code">eq</code> is not supplied, structural equality is used.<br> </div> <pre><span class="keyword">val</span> <a name="VALfind"></a>find : <code class="type"><a href="UChar.html#TYPEt">UChar.t</a> -> 'a <a href="UMap.html#TYPEt">t</a> -> 'a</code></pre><pre><span class="keyword">val</span> <a name="VALremove"></a>remove : <code class="type"><a href="UChar.html#TYPEt">UChar.t</a> -> 'a <a href="UMap.html#TYPEt">t</a> -> 'a <a href="UMap.html#TYPEt">t</a></code></pre><pre><span class="keyword">val</span> <a name="VALremove_range"></a>remove_range : <code class="type"><a href="UChar.html#TYPEt">UChar.t</a> -> <a href="UChar.html#TYPEt">UChar.t</a> -> 'a <a href="UMap.html#TYPEt">t</a> -> 'a <a href="UMap.html#TYPEt">t</a></code></pre><div class="info"> <code class="code">remove_range u1 u2 m</code> removes <code class="code">u1</code>-<code class="code">u2</code> from the domain of <code class="code">m</code><br> </div> <pre><span class="keyword">val</span> <a name="VALfrom"></a>from : <code class="type"><a href="UChar.html#TYPEt">UChar.t</a> -> 'a <a href="UMap.html#TYPEt">t</a> -> 'a <a href="UMap.html#TYPEt">t</a></code></pre><div class="info"> <code class="code">from u m</code> restricts the domain of <code class="code">m</code> to the characters whose code points are equal or greater than <code class="code">u</code>.<br> </div> <pre><span class="keyword">val</span> <a name="VALafter"></a>after : <code class="type"><a href="UChar.html#TYPEt">UChar.t</a> -> 'a <a href="UMap.html#TYPEt">t</a> -> 'a <a href="UMap.html#TYPEt">t</a></code></pre><div class="info"> <code class="code">after u m</code> restricts the domain of <code class="code">m</code> to the characters whose code points are greater than <code class="code">u</code>.<br> </div> <pre><span class="keyword">val</span> <a name="VALuntil"></a>until : <code class="type"><a href="UChar.html#TYPEt">UChar.t</a> -> 'a <a href="UMap.html#TYPEt">t</a> -> 'a <a href="UMap.html#TYPEt">t</a></code></pre><div class="info"> <code class="code">until u m</code> restricts the domain of <code class="code">m</code> to the characters whose code points are equal or smaller than <code class="code">u</code>.<br> </div> <pre><span class="keyword">val</span> <a name="VALbefore"></a>before : <code class="type"><a href="UChar.html#TYPEt">UChar.t</a> -> 'a <a href="UMap.html#TYPEt">t</a> -> 'a <a href="UMap.html#TYPEt">t</a></code></pre><div class="info"> <code class="code">before u m</code> restricts the domain of <code class="code">m</code> to the characters whose code points are smaller than <code class="code">u</code>.<br> </div> <pre><span class="keyword">val</span> <a name="VALmem"></a>mem : <code class="type"><a href="UChar.html#TYPEt">UChar.t</a> -> 'a <a href="UMap.html#TYPEt">t</a> -> bool</code></pre><pre><span class="keyword">val</span> <a name="VALiter"></a>iter : <code class="type">(<a href="UChar.html#TYPEt">UChar.t</a> -> 'a -> unit) -> 'a <a href="UMap.html#TYPEt">t</a> -> unit</code></pre><pre><span class="keyword">val</span> <a name="VALiter_range"></a>iter_range : <code class="type">(<a href="UChar.html#TYPEt">UChar.t</a> -> <a href="UChar.html#TYPEt">UChar.t</a> -> 'a -> unit) -> 'a <a href="UMap.html#TYPEt">t</a> -> unit</code></pre><div class="info"> <code class="code">iter proc m</code> : For each contingent region <code class="code">u1</code>-<code class="code">u2</code> that is mapped to a constant <code class="code">v</code>, <code class="code">proc u1 u2 v</code> is called. The order of call is determined by increasing order on <code class="code">u1</code>.<br> </div> <br> <code class="code">map ?eq f m</code> and <code class="code">mapi ?eq f m</code> : Similar to <code class="code">map</code> and <code class="code">mapi</code> in stdlib Map, but if the map <code class="code">m'</code> is returned, it is only guaranteed that <code class="code">eq (find u m') (f (find u m ))</code> is true for <code class="code">map</code> and <code class="code">eq (find u m') (f u (find u m ))</code> is true for <code class="code">mapi</code>. If <code class="code">eq</code> is not specified, structural equality is used.<br> <pre><span class="keyword">val</span> <a name="VALmap"></a>map : <code class="type">?eq:('a -> 'a -> bool) -> ('b -> 'a) -> 'b <a href="UMap.html#TYPEt">t</a> -> 'a <a href="UMap.html#TYPEt">t</a></code></pre><pre><span class="keyword">val</span> <a name="VALmapi"></a>mapi : <code class="type">?eq:('a -> 'a -> bool) -> (<a href="UChar.html#TYPEt">UChar.t</a> -> 'b -> 'a) -> 'b <a href="UMap.html#TYPEt">t</a> -> 'a <a href="UMap.html#TYPEt">t</a></code></pre><pre><span class="keyword">val</span> <a name="VALfold"></a>fold : <code class="type">(<a href="UChar.html#TYPEt">UChar.t</a> -> 'a -> 'b -> 'b) -> 'a <a href="UMap.html#TYPEt">t</a> -> 'b -> 'b</code></pre><pre><span class="keyword">val</span> <a name="VALfold_range"></a>fold_range : <code class="type">(<a href="UChar.html#TYPEt">UChar.t</a> -> <a href="UChar.html#TYPEt">UChar.t</a> -> 'a -> 'b -> 'b) -> 'a <a href="UMap.html#TYPEt">t</a> -> 'b -> 'b</code></pre><div class="info"> <code class="code">fold_range f m x</code> is equivalent to <code class="code">f u_(2n) u_(2n+1) v_n (... (f u_1 u_2 v_1 x))</code> where all characters in the range <code class="code">u_(2k)</code>-<code class="code">u_(2k+1)</code> are mapped to <code class="code">v_k</code> and <code class="code">u_1</code> < <code class="code">u_3</code> < ... in code point order. For each range <code class="code">u_(2k)</code>-<code class="code">u_(2k+1)</code> is separated by a character which is not mapped to <code class="code">v_k</code>.<br> </div> <pre><span class="keyword">val</span> <a name="VALset_to_map"></a>set_to_map : <code class="type"><a href="USet.html#TYPEt">USet.t</a> -> 'a -> 'a <a href="UMap.html#TYPEt">t</a></code></pre><div class="info"> Constant map.<br> </div> <pre><span class="keyword">val</span> <a name="VALdomain"></a>domain : <code class="type">'a <a href="UMap.html#TYPEt">t</a> -> <a href="USet.html#TYPEt">USet.t</a></code></pre><div class="info"> Domain.<br> </div> <pre><span class="keyword">val</span> <a name="VALmap_to_set"></a>map_to_set : <code class="type">('a -> bool) -> 'a <a href="UMap.html#TYPEt">t</a> -> <a href="USet.html#TYPEt">USet.t</a></code></pre><div class="info"> <code class="code">map_to_set p m</code> returns the set of characters which are mapped to values satisfying the predicate <code class="code">p</code> by <code class="code">m</code>.<br> </div> <pre><span class="keyword">val</span> <a name="VALumap_of_imap"></a>umap_of_imap : <code class="type">'a <a href="IMap.html#TYPEt">IMap.t</a> -> 'a <a href="UMap.html#TYPEt">t</a></code></pre><pre><span class="keyword">val</span> <a name="VALimap_of_umap"></a>imap_of_umap : <code class="type">'a <a href="UMap.html#TYPEt">t</a> -> 'a <a href="IMap.html#TYPEt">IMap.t</a></code></pre></body></html>