mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
2 lines
No EOL
3.2 KiB
HTML
2 lines
No EOL
3.2 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Ref (containers.CCList.Ref)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><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> » <a href="../index.html">CCList</a> » Ref</nav><h1>Module <code>CCList.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>'a t</code><code><span class="keyword"> = </span><span class="type-var">'a</span> list Pervasives.ref</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 class="type-var">'a</span> <a href="index.html#type-t">t</a> <span>-></span> <span class="type-var">'a</span> <span>-></span> unit</code></dt><dt class="spec value" id="val-pop"><a href="#val-pop" class="anchor"></a><code><span class="keyword">val </span>pop : <span class="type-var">'a</span> <a href="index.html#type-t">t</a> <span>-></span> <span class="type-var">'a</span> option</code></dt><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 class="type-var">'a</span> <a href="index.html#type-t">t</a> <span>-></span> <span class="type-var">'a</span></code></dt><dd><p>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>-></span> <span class="type-var">'a</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Create a new list reference.</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 class="type-var">_</span> <a href="index.html#type-t">t</a> <span>-></span> unit</code></dt><dd><p>Remove all elements.</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 class="type-var">'a</span> list <span>-></span> <span class="type-var">'b</span>) <span>-></span> <span class="type-var">'a</span> <a href="index.html#type-t">t</a> <span>-></span> <span class="type-var">'b</span></code></dt><dd><p>Apply a list function to the content.</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 class="type-var">'a</span> <a href="index.html#type-t">t</a> <span>-></span> <span class="type-var">'a</span> list <span>-></span> unit</code></dt><dd><p>Add elements of the list at the beginning of the list ref. Elements at the end of the list will be at the beginning of the list ref.</p></dd></dl></div></body></html> |