ocaml-containers/3.0/containers/CCListLabels/Ref/index.html
Simon Cruanes 2fa8e5f507 fix doc
2020-08-04 09:49:29 -04:00

2 lines
No EOL
4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Ref (containers.CCListLabels.Ref)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> <a href="../../index.html">containers</a> &#x00BB; <a href="../index.html">CCListLabels</a> &#x00BB; Ref</nav><h1>Module <code>CCListLabels.Ref</code></h1></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> <span>'a t</span></code><code> = <span><span><span class="type-var">'a</span> list</span> Stdlib.ref</span></code></dt></dl><dl><dt class="spec value" id="val-push"><a href="#val-push" class="anchor"></a><code><span class="keyword">val</span> push : <span><span class="type-var">'a</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> unit</code></dt><dd><p><code>push rlist e</code> adds an element <code>e</code> at the head of <code>rlist</code>.</p></dd></dl><dl><dt class="spec value" id="val-pop"><a href="#val-pop" class="anchor"></a><code><span class="keyword">val</span> pop : <span><span class="type-var">'a</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> option</span></code></dt><dd><p><code>pop rlist</code> removes and returns <code>Some e</code> (the first element of <code>rlist</code>) or <code>None</code> if the <code>rlist</code> is empty</p></dd></dl><dl><dt class="spec value" id="val-pop_exn"><a href="#val-pop_exn" class="anchor"></a><code><span class="keyword">val</span> pop_exn : <span><span class="type-var">'a</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p><code>pop_exn rlist</code> removes and returns the first element of <code>rlist</code>. Unsafe version of <a href="index.html#val-pop"><code>pop</code></a>.</p><dl><dt>raises Failure</dt><dd><p>if the list is empty.</p></dd></dl></dd></dl><dl><dt class="spec value" id="val-create"><a href="#val-create" class="anchor"></a><code><span class="keyword">val</span> create : unit <span>&#45;&gt;</span> <span><span class="type-var">'a</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p><code>create ()</code> creates a new empty reference list.</p></dd></dl><dl><dt class="spec value" id="val-clear"><a href="#val-clear" class="anchor"></a><code><span class="keyword">val</span> clear : <span><span class="type-var">_</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> unit</code></dt><dd><p><code>clear rlist</code> removes all elements of <code>rlist</code>.</p></dd></dl><dl><dt class="spec value" id="val-lift"><a href="#val-lift" class="anchor"></a><code><span class="keyword">val</span> lift : <span>(<span><span class="type-var">'a</span> list</span> <span>&#45;&gt;</span> <span class="type-var">'b</span>)</span> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span class="type-var">'b</span></code></dt><dd><p><code>lift f rlist</code> applies a list function <code>f</code> to the content of <code>rlist</code>.</p></dd></dl><dl><dt class="spec value" id="val-push_list"><a href="#val-push_list" class="anchor"></a><code><span class="keyword">val</span> push_list : <span><span class="type-var">'a</span> <a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <span><span class="type-var">'a</span> list</span> <span>&#45;&gt;</span> unit</code></dt><dd><p><code>push_list rlist l</code> adds elements of the list <code>l</code> at the beginning of the list ref <code>rlist</code>. Elements at the end of the list <code>l</code> will be at the beginning of the list ref <code>rlist</code>.</p></dd></dl></div></body></html>