man-pages/man3/CamlinternalMenhirLib.InfiniteArray.3o.html
2021-03-31 01:06:50 +01:00

159 lines
2.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of CamlinternalMenhirLib.InfiniteArray</TITLE>
</HEAD><BODY>
<H1>CamlinternalMenhirLib.InfiniteArray</H1>
Section: OCaml library (3o)<BR>Updated: 2020-01-30<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
CamlinternalMenhirLib.InfiniteArray - no description
<A NAME="lbAC">&nbsp;</A>
<H2>Module</H2>
Module CamlinternalMenhirLib.InfiniteArray
<A NAME="lbAD">&nbsp;</A>
<H2>Documentation</H2>
<P>
Module
<B>InfiniteArray</B>
<BR>&nbsp;:&nbsp;
<B>sig end</B>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<I>type </I>
<B>'a</B>
<I>t </I>
<P>
<P>
This module implements infinite arrays. *
<P>
<P>
<P>
<I>val make </I>
:
<B>'a -&gt; 'a t</B>
<P>
<P>
<B>make x</B>
creates an infinite array, where every slot contains
<B>x</B>
. *
<P>
<P>
<P>
<I>val get </I>
:
<B>'a t -&gt; int -&gt; 'a</B>
<P>
<P>
<B>get a i</B>
returns the element contained at offset
<B>i</B>
in the array
<B>a</B>
.
Slots are numbered 0 and up. *
<P>
<P>
<P>
<I>val set </I>
:
<B>'a t -&gt; int -&gt; 'a -&gt; unit</B>
<P>
<P>
<B>set a i x</B>
sets the element contained at offset
<B>i</B>
in the array
<B>a</B>
to
<B>x</B>
. Slots are numbered 0 and up. *
<P>
<P>
<P>
<I>val extent </I>
:
<B>'a t -&gt; int</B>
<P>
<P>
<B>extent a</B>
is the length of an initial segment of the array
<B>a</B>
that is sufficiently large to contain all
<B>set</B>
operations ever
performed. In other words, all elements beyond that segment have
the default value.
<P>
<P>
<P>
<I>val domain </I>
:
<B>'a t -&gt; 'a array</B>
<P>
<P>
<B>domain a</B>
is a fresh copy of an initial segment of the array
<B>a</B>
whose length is
<B>extent a</B>
.
<P>
<P>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">Module</A><DD>
<DT id="3"><A HREF="#lbAD">Documentation</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:37 GMT, March 31, 2021
</BODY>
</HTML>