Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > ee3d8430cc80796773ea2e1c8ad4ef5d > files > 113

ocaml-reins-devel-0.1a-10.fc15.i686.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">
<link rel="Start" href="index.html">
<link rel="Up" href="Reins.ListCursor.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 modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Reins" rel="Chapter" href="Reins.html"><title>Reins.ListCursor.S</title>
</head>
<body>
<div class="navbar">&nbsp;<a href="Reins.ListCursor.html">Up</a>
&nbsp;</div>
<center><h1>Module type <a href="type_Reins.ListCursor.S.html">Reins.ListCursor.S</a></h1></center>
<br>
<pre><span class="keyword">module type</span> S = <code class="code">sig</code> <a href="Reins.ListCursor.S.html">..</a> <code class="code">end</code></pre><hr width="100%">
<pre><span id="TYPElist_"><span class="keyword">type</span> <code class="type">'a</code> list_</span> </pre>
<div class="info">
The underlying list type the cursor points to.<br>
</div>

<pre><span id="TYPEcursor"><span class="keyword">type</span> <code class="type">'a</code> cursor</span> </pre>
<div class="info">
The type of list cursors.  A cursor can be thought of a
	  pointer into the middle of a list.  More specifically,
	  cursors point to edges between list elements, not elements
	  directly.  A cursor can be move to the left (towards the
	  front of the list) or to the right (towards the back of the
	  list) and supports updating the list at the current position
	  efficiently.<br>
</div>

<pre><span id="VALto_cursor"><span class="keyword">val</span> to_cursor</span> : <code class="type">'a <a href="Reins.ListCursor.S.html#TYPElist_">list_</a> -> 'a <a href="Reins.ListCursor.S.html#TYPEcursor">cursor</a></code></pre><div class="info">
<code class="code">to_cursor t</code> Create a cursor that points to the beginning of
	list <code class="code">t</code>.  Runs in O(1) time and space.<br>
</div>
<pre><span id="VALfrom_cursor"><span class="keyword">val</span> from_cursor</span> : <code class="type">'a <a href="Reins.ListCursor.S.html#TYPEcursor">cursor</a> -> 'a <a href="Reins.ListCursor.S.html#TYPElist_">list_</a></code></pre><div class="info">
<code class="code">from_cursor curs</code> Return the list that is pointed to by
	<code class="code">curs</code>.  Runs in O(n) time and O(1) stack space where n is the
	number of elements to the left of <code class="code">curs</code>.<br>
</div>
<pre><span id="VALat_front"><span class="keyword">val</span> at_front</span> : <code class="type">'a <a href="Reins.ListCursor.S.html#TYPEcursor">cursor</a> -> bool</code></pre><div class="info">
<code class="code">at_front curs</code> Returns true if there are no elements to the
	left of <code class="code">curs</code>.  Runs in O(1) time and stack space.<br>
</div>
<pre><span id="VALat_back"><span class="keyword">val</span> at_back</span> : <code class="type">'a <a href="Reins.ListCursor.S.html#TYPEcursor">cursor</a> -> bool</code></pre><div class="info">
<code class="code">at_end curs</code> Returns true if there are no elements to the
	right of <code class="code">curs</code>.  Runs in O(1) time and stack space.<br>
</div>
<pre><span id="VALmove_next"><span class="keyword">val</span> move_next</span> : <code class="type">'a <a href="Reins.ListCursor.S.html#TYPEcursor">cursor</a> -> 'a <a href="Reins.ListCursor.S.html#TYPEcursor">cursor</a></code></pre><div class="info">
<code class="code">move_left curs</code> Moves the cursor one element to the left.  If
	there are no elements to the left of <code class="code">curs</code> (i.e., <code class="code">curs</code>
	points to the front of the list), it raises <code class="code">Failure
	"move_left"</code>.  Runs in O(1) time and stack space.<br>
</div>
<pre><span id="VALmove_prev"><span class="keyword">val</span> move_prev</span> : <code class="type">'a <a href="Reins.ListCursor.S.html#TYPEcursor">cursor</a> -> 'a <a href="Reins.ListCursor.S.html#TYPEcursor">cursor</a></code></pre><div class="info">
<code class="code">move_right curs</code> Moves the cursor one element to the right.
	If there are no elements to the right of <code class="code">curs</code> (i.e., <code class="code">curs</code>
	points to the end of the list), it raises <code class="code">Failure
	"move_right"</code>.  Runs in O(1) time and stack space.<br>
</div>
<pre><span id="VALgoto_front"><span class="keyword">val</span> goto_front</span> : <code class="type">'a <a href="Reins.ListCursor.S.html#TYPEcursor">cursor</a> -> 'a <a href="Reins.ListCursor.S.html#TYPEcursor">cursor</a></code></pre><div class="info">
<code class="code">goto_front curs</code>  Moves the cursor to the front of the
	list.  Runs in O(n) time and O(1) stack space where n is the
	number of elements to the left of <code class="code">curs</code>.<br>
</div>
<pre><span id="VALgoto_back"><span class="keyword">val</span> goto_back</span> : <code class="type">'a <a href="Reins.ListCursor.S.html#TYPEcursor">cursor</a> -> 'a <a href="Reins.ListCursor.S.html#TYPEcursor">cursor</a></code></pre><div class="info">
<code class="code">goto_back curs</code> Moves the cursor to the back of the list.
	Runs in O(n) time and O(1) stack space where n is the number
	of elements to the right of <code class="code">curs</code>.<br>
</div>
<pre><span id="VALvalue"><span class="keyword">val</span> value</span> : <code class="type">'a <a href="Reins.ListCursor.S.html#TYPEcursor">cursor</a> -> 'a option</code></pre><div class="info">
If the cursor currently points to an element <code class="code">x</code>, return that
	element as <code class="code">Some x</code>, otherwise return <code class="code">None</code>.<br>
</div>
<pre><span id="VALlist"><span class="keyword">val</span> list</span> : <code class="type">'a <a href="Reins.ListCursor.S.html#TYPEcursor">cursor</a> -> 'a <a href="Reins.ListCursor.S.html#TYPElist_">list_</a></code></pre><div class="info">
<code class="code">list curs</code> Returns all of the elements to the right of <code class="code">curs</code>
	as a <code class="code">'a list_</code>.  Runs in O(1) time and stack space.<br>
</div>
<pre><span id="VALreplace_list"><span class="keyword">val</span> replace_list</span> : <code class="type">'a <a href="Reins.ListCursor.S.html#TYPElist_">list_</a> -><br>       'a <a href="Reins.ListCursor.S.html#TYPEcursor">cursor</a> -> 'a <a href="Reins.ListCursor.S.html#TYPEcursor">cursor</a></code></pre><div class="info">
<code class="code">replace_list l curs</code> Replaces the list of elements to the
	right of <code class="code">curs</code> with <code class="code">l</code>.  Runs in O(1) time and stack
	space.<br>
</div>
</body></html>