ocaml-containers/3.2/containers-data/CCHashSet/Make/index.html
2021-02-01 10:58:00 -05:00

2 lines
No EOL
11 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>Make (containers-data.CCHashSet.Make)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.2"/><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-data</a> &#x00BB; <a href="../index.html">CCHashSet</a> &#x00BB; Make</nav><h1>Module <code>CCHashSet.Make</code></h1></header><h3 class="heading">Parameters</h3><ul><li><code><a href="argument-1-E/index.html">E</a> : <a href="../index.html#module-type-ELEMENT">ELEMENT</a></code></li></ul><h3 class="heading">Signature</h3><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code></dt><dt class="spec type" id="type-elt"><a href="#type-elt" class="anchor"></a><code><span class="keyword">type</span> elt</code><code> = <a href="argument-1-E/index.html#type-t">E.t</a></code></dt></dl><dl><dt class="spec value" id="val-create"><a href="#val-create" class="anchor"></a><code><span class="keyword">val</span> create : int <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>create n</code> makes a new set with the given capacity <code>n</code>.</p></dd></dl><dl><dt class="spec value" id="val-singleton"><a href="#val-singleton" class="anchor"></a><code><span class="keyword">val</span> singleton : <a href="index.html#type-elt">elt</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>singleton x</code> is the singleton <code>{x}</code>.</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 : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p><code>clear s</code> removes all elements from <code>s</code>.</p></dd></dl><dl><dt class="spec value" id="val-copy"><a href="#val-copy" class="anchor"></a><code><span class="keyword">val</span> copy : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Fresh copy.</p></dd></dl><dl><dt class="spec value" id="val-copy_into"><a href="#val-copy_into" class="anchor"></a><code><span class="keyword">val</span> copy_into : <span>into:<a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p><code>copy_into ~into s</code> copies all elements of <code>s</code> into <code>into</code>.</p></dd></dl><dl><dt class="spec value" id="val-insert"><a href="#val-insert" class="anchor"></a><code><span class="keyword">val</span> insert : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-elt">elt</a> <span>&#45;&gt;</span> unit</code></dt><dd><p><code>insert s x</code> adds <code>x</code> into <code>s</code>.</p></dd></dl><dl><dt class="spec value" id="val-remove"><a href="#val-remove" class="anchor"></a><code><span class="keyword">val</span> remove : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-elt">elt</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Remove the element, if it were in there.</p></dd></dl><dl><dt class="spec value" id="val-cardinal"><a href="#val-cardinal" class="anchor"></a><code><span class="keyword">val</span> cardinal : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dd><p><code>cardinal s</code> returns the number of elements in <code>s</code>.</p></dd></dl><dl><dt class="spec value" id="val-mem"><a href="#val-mem" class="anchor"></a><code><span class="keyword">val</span> mem : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-elt">elt</a> <span>&#45;&gt;</span> bool</code></dt><dd><p><code>mem s x</code> returns <code>true</code> iff <code>x</code> is in <code>s</code>.</p></dd></dl><dl><dt class="spec value" id="val-find_exn"><a href="#val-find_exn" class="anchor"></a><code><span class="keyword">val</span> find_exn : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-elt">elt</a> <span>&#45;&gt;</span> <a href="index.html#type-elt">elt</a></code></dt><dd><p><code>find_exn s x</code> returns <code>y</code> if <code>x</code> and <code>y</code> are equal, and <code>mem s y</code>.</p><dl><dt>raises Not_found</dt><dd><p>if <code>x</code> not in <code>s</code>.</p></dd></dl></dd></dl><dl><dt class="spec value" id="val-find"><a href="#val-find" class="anchor"></a><code><span class="keyword">val</span> find : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-elt">elt</a> <span>&#45;&gt;</span> <span><a href="index.html#type-elt">elt</a> option</span></code></dt><dd><p>Safe version of <a href="index.html#val-find_exn"><code>find_exn</code></a>.</p></dd></dl><dl><dt class="spec value" id="val-inter"><a href="#val-inter" class="anchor"></a><code><span class="keyword">val</span> inter : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>inter a b</code> returns <code>a ∩ b</code>.</p></dd></dl><dl><dt class="spec value" id="val-inter_mut"><a href="#val-inter_mut" class="anchor"></a><code><span class="keyword">val</span> inter_mut : <span>into:<a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p><code>inter_mut ~into a</code> changes <code>into</code> into <code>a ∩ into</code>.</p></dd></dl><dl><dt class="spec value" id="val-union"><a href="#val-union" class="anchor"></a><code><span class="keyword">val</span> union : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>union a b</code> returns <code>a b</code>.</p></dd></dl><dl><dt class="spec value" id="val-union_mut"><a href="#val-union_mut" class="anchor"></a><code><span class="keyword">val</span> union_mut : <span>into:<a href="index.html#type-t">t</a></span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p><code>union_mut ~into a</code> changes <code>into</code> into <code>a into</code>.</p></dd></dl><dl><dt class="spec value" id="val-diff"><a href="#val-diff" class="anchor"></a><code><span class="keyword">val</span> diff : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>diff a b</code> returns <code>a - b</code>.</p></dd></dl><dl><dt class="spec value" id="val-subset"><a href="#val-subset" class="anchor"></a><code><span class="keyword">val</span> subset : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p><code>subset a b</code> returns <code>true</code> if all elements of <code>a</code> are in <code>b</code>.</p></dd></dl><dl><dt class="spec value" id="val-equal"><a href="#val-equal" class="anchor"></a><code><span class="keyword">val</span> equal : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p><code>equal a b</code> is extensional equality (<code>a</code> and <code>b</code> have the same elements).</p></dd></dl><dl><dt class="spec value" id="val-for_all"><a href="#val-for_all" class="anchor"></a><code><span class="keyword">val</span> for_all : <span>(<a href="index.html#type-elt">elt</a> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-exists"><a href="#val-exists" class="anchor"></a><code><span class="keyword">val</span> exists : <span>(<a href="index.html#type-elt">elt</a> <span>&#45;&gt;</span> bool)</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-iter"><a href="#val-iter" class="anchor"></a><code><span class="keyword">val</span> iter : <span>(<a href="index.html#type-elt">elt</a> <span>&#45;&gt;</span> unit)</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Iterate on values.</p></dd></dl><dl><dt class="spec value" id="val-fold"><a href="#val-fold" class="anchor"></a><code><span class="keyword">val</span> fold : <span>(<span class="type-var">'a</span> <span>&#45;&gt;</span> <a href="index.html#type-elt">elt</a> <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span class="type-var">'a</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>Fold on values.</p></dd></dl><dl><dt class="spec value" id="val-elements"><a href="#val-elements" class="anchor"></a><code><span class="keyword">val</span> elements : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span><a href="index.html#type-elt">elt</a> list</span></code></dt><dd><p>List of elements.</p></dd></dl><dl><dt class="spec value" id="val-of_list"><a href="#val-of_list" class="anchor"></a><code><span class="keyword">val</span> of_list : <span><a href="index.html#type-elt">elt</a> list</span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-to_iter"><a href="#val-to_iter" class="anchor"></a><code><span class="keyword">val</span> to_iter : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span><a href="index.html#type-elt">elt</a> <a href="../index.html#type-iter">iter</a></span></code></dt><dt class="spec value" id="val-of_iter"><a href="#val-of_iter" class="anchor"></a><code><span class="keyword">val</span> of_iter : <span><a href="index.html#type-elt">elt</a> <a href="../index.html#type-iter">iter</a></span> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-add_iter"><a href="#val-add_iter" class="anchor"></a><code><span class="keyword">val</span> add_iter : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span><a href="index.html#type-elt">elt</a> <a href="../index.html#type-iter">iter</a></span> <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span class="keyword">val</span> pp : <span>?&#8288;pp_sep:<span>unit <a href="../index.html#type-printer">printer</a></span></span> <span>&#45;&gt;</span> <span><a href="index.html#type-elt">elt</a> <a href="../index.html#type-printer">printer</a></span> <span>&#45;&gt;</span> <span><a href="index.html#type-t">t</a> <a href="../index.html#type-printer">printer</a></span></code></dt><dd><p><code>pp pp_elt</code> returns a set printer, given a printer for individual elements.</p></dd></dl></div></body></html>