mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-17 08:06:43 -05:00
2 lines
No EOL
1.9 KiB
HTML
2 lines
No EOL
1.9 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Oo (ocaml.Stdlib.Oo)</title><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">ocaml</a> » <a href="../index.html">Stdlib</a> » Oo</nav><header class="odoc-preamble"><h1>Module <code><span>Stdlib.Oo</span></code></h1><p>Operations on objects</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-copy"><a href="#val-copy" class="anchor"></a><code><span><span class="keyword">val</span> copy : <span><span>< .. ></span> <span class="keyword">as</span> 'a <span class="arrow">-></span></span> <span class="type-var">'a</span></span></code></div><div class="spec-doc"><p><code>Oo.copy o</code> returns a copy of object <code>o</code>, that is a fresh object with the same methods and instance variables as <code>o</code>.</p></div></div><div class="odoc-spec"><div class="spec value external anchored" id="val-id"><a href="#val-id" class="anchor"></a><code><span><span class="keyword">val</span> id : <span><span>< .. ></span> <span class="arrow">-></span></span> int</span></code></div><div class="spec-doc"><p>Return an integer identifying this object, unique for the current execution of the program. The generic comparison and hashing functions are based on this integer. When an object is obtained by unmarshaling, the id is refreshed, and thus different from the original object. As a consequence, the internal invariants of data structures such as hash table or sets containing objects are broken after unmarshaling the data structures.</p></div></div></div></body></html> |