This file is indexed.

/usr/share/doc/racket/data/integer-set.html is in racket-doc 6.1-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>8&nbsp;Integer Sets</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9660;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Data:<span class="mywbr"> &nbsp;</span> Data Structures</a></td></tr></table></div><div class="tocviewsublistonly" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="Imperative_Queues.html" class="tocviewlink" data-pltdoc="x">Imperative Queues</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="gvector.html" class="tocviewlink" data-pltdoc="x">Growable Vectors</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="Orders_and_Ordered_Dictionaries.html" class="tocviewlink" data-pltdoc="x">Orders and Ordered Dictionaries</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="Splay_Trees.html" class="tocviewlink" data-pltdoc="x">Splay Trees</a></td></tr><tr><td align="right">5&nbsp;</td><td><a href="skip-list.html" class="tocviewlink" data-pltdoc="x">Skip Lists</a></td></tr><tr><td align="right">6&nbsp;</td><td><a href="interval-map.html" class="tocviewlink" data-pltdoc="x">Interval Maps</a></td></tr><tr><td align="right">7&nbsp;</td><td><a href="Binary_Heaps.html" class="tocviewlink" data-pltdoc="x">Binary Heaps</a></td></tr><tr><td align="right">8&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Integer Sets</a></td></tr><tr><td align="right">9&nbsp;</td><td><a href="bit-vector.html" class="tocviewlink" data-pltdoc="x">Bit Vectors</a></td></tr><tr><td align="right">10&nbsp;</td><td><a href="union-find.html" class="tocviewlink" data-pltdoc="x">Union-<wbr></wbr>Find:<span class="mywbr"> &nbsp;</span> Sets with only Canonical Elements</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._make-integer-set%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>integer-<wbr></wbr>set</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set-contents%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">integer-<wbr></wbr>set-<wbr></wbr>contents</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._set-integer-set-contents%21%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>integer-<wbr></wbr>set-<wbr></wbr>contents!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">integer-<wbr></wbr>set?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._well-formed-set~3f%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">well-<wbr></wbr>formed-<wbr></wbr>set?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._make-range%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>range</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._intersect%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">intersect</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._subtract%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">subtract</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._union%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">union</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._split%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">split</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._complement%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">complement</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._symmetric-difference%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">symmetric-<wbr></wbr>difference</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._member~3f%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">member?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._get-integer%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">get-<wbr></wbr>integer</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._foldr%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">foldr</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._partition%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">partition</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._count%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">count</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._subset~3f%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">subset?</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="version">6.1</span></div><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.1&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="Binary_Heaps.html" title="backward to &quot;7 Binary Heaps&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;Data: Data Structures&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="bit-vector.html" title="forward to &quot;9 Bit Vectors&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h3 x-source-module="(lib &quot;data/scribblings/data.scrbl&quot;)" x-part-tag="&quot;integer-set&quot;">8<tt>&nbsp;</tt><a name="(part._integer-set)"></a><a name="(mod-path._data/integer-set)"></a>Integer Sets</h3><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">data/integer-set</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">base</span></span></td></tr></table></p><p>This library provides functions for
working with finite sets of integers.  This module is designed for
sets that are compactly represented as groups of intervals, even when
their cardinality is large.  For example, the set of integers from
<span style="font-style: italic">-</span>1<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span> to <span style="font-style: italic"></span>1<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span> except for <span style="font-style: italic"></span>0<span style="font-style: italic"></span>, can be represented as
<span style="font-style: italic"></span>{<span style="font-style: italic"></span>[<span style="font-style: italic">-</span>1<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic">, -</span>1<span style="font-style: italic"></span>]<span style="font-style: italic">, </span>[<span style="font-style: italic"></span>1<span style="font-style: italic">, </span>1<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>]<span style="font-style: italic"></span>}<span style="font-style: italic"></span>.  This data structure would not be
a good choice for the set of all odd integers between <span style="font-style: italic"></span>0<span style="font-style: italic"></span> and
<span style="font-style: italic"></span>1<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>0<span style="font-style: italic"></span>, which would be <span style="font-style: italic"></span>{<span style="font-style: italic"></span>[<span style="font-style: italic"></span>1<span style="font-style: italic">, </span>1<span style="font-style: italic"></span>]<span style="font-style: italic">, </span>[<span style="font-style: italic"></span>3<span style="font-style: italic">, </span>3<span style="font-style: italic"></span>]<span style="font-style: italic">, ... </span>[<span style="font-style: italic"></span>9<span style="font-style: italic"></span>9<span style="font-style: italic"></span>9<span style="font-style: italic"></span>9<span style="font-style: italic"></span>9<span style="font-style: italic"></span>9<span style="font-style: italic">,</span><span style="font-style: italic">
</span><span style="font-style: italic"></span>9<span style="font-style: italic"></span>9<span style="font-style: italic"></span>9<span style="font-style: italic"></span>9<span style="font-style: italic"></span>9<span style="font-style: italic"></span>9<span style="font-style: italic"></span>]<span style="font-style: italic"></span>}<span style="font-style: italic"></span>.</p><p>In addition to the <span style="font-style: italic">integer set</span> abstract type, a
<span style="font-style: italic">well-formed set</span> is a list of pairs of exact integers, where
each pair represents a closed range of integers, and the entire set is
the union of the ranges.  The ranges must be disjoint and increasing.
Further, adjacent ranges must have at least one integer between them.
For example: <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">(</span><span class="RktVal"><span class="nobreak">-1</span></span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">2</span><span class="RktVal">)</span><span class="stt"> </span><span class="RktVal">(</span><span class="RktVal">4</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">10</span><span class="RktVal">)</span><span class="RktVal">)</span> is a well-formed-set as is
<span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">1</span><span class="RktVal">)</span><span class="stt"> </span><span class="RktVal">(</span><span class="RktVal">3</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">3</span><span class="RktVal">)</span><span class="RktVal">)</span>, but <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">5</span><span class="RktVal">)</span><span class="stt"> </span><span class="RktVal">(</span><span class="RktVal">6</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">7</span><span class="RktVal">)</span><span class="RktVal">)</span>,
<span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">5</span><span class="RktVal">)</span><span class="stt"> </span><span class="RktVal">(</span><span class="RktVal"><span class="nobreak">-3</span></span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal"><span class="nobreak">-1</span></span><span class="RktVal">)</span><span class="RktVal">)</span>, <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">(</span><span class="RktVal">5</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">1</span><span class="RktVal">)</span><span class="RktVal">)</span>, and <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">5</span><span class="RktVal">)</span><span class="stt"> </span><span class="RktVal">(</span><span class="RktVal">3</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">6</span><span class="RktVal">)</span><span class="RktVal">)</span> are not.</p><p>An integer set implements the <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=streams.html%23%2528tech._stream%2529&amp;version=6.1" class="techoutside Sq" data-pltdoc="x"><span class="techinside">stream</span></a> and
<a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=sequences.html%23%2528tech._sequence%2529&amp;version=6.1" class="techoutside Sq" data-pltdoc="x"><span class="techinside">sequence</span></a> generic interfaces.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._make-integer-set))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._make-integer-set%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-integer-set</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">wfs</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">wfs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._well-formed-set~3f%29%29" class="RktValLink" data-pltdoc="x">well-formed-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Creates an integer set from a well-formed set.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._integer-set-contents))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set-contents%29%29" class="RktValDef RktValLink" data-pltdoc="x">integer-set-contents</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">s</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._well-formed-set~3f%29%29" class="RktValLink" data-pltdoc="x">well-formed-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">s</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a well-formed set from an integer set.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._set-integer-set-contents!))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._set-integer-set-contents%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-integer-set-contents!</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">s</span><span class="hspace">&nbsp;</span><span class="RktVar">wfs</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">s</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">wfs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._well-formed-set~3f%29%29" class="RktValLink" data-pltdoc="x">well-formed-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Mutates an integer set.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._integer-set~3f))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">integer-set?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is an integer set, <span class="RktVal">#f</span>
otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._well-formed-set~3f))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._well-formed-set~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">well-formed-set?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is a well-formed set, <span class="RktVal">#f</span>
otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._make-range))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._make-range%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-range</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._make-range%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-range</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">elem</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">elem</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._make-range%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-range</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span><span class="RktVar">end</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Produces, respectively, an empty integer set, an integer set
containing only <span class="RktVar">elem</span>, or an integer set containing the
integers from <span class="RktVar">start</span> to <span class="RktVar">end</span> inclusive, where
<span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3c%7E3d%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">&lt;=</a></span><span class="stt"> </span><span class="RktVar">start</span><span class="stt"> </span><span class="RktVar">end</span><span class="RktPn">)</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._intersect))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._intersect%29%29" class="RktValDef RktValLink" data-pltdoc="x">intersect</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">x</span><span class="hspace">&nbsp;</span><span class="RktVar">y</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">x</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">y</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the intersection of the given sets.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._subtract))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._subtract%29%29" class="RktValDef RktValLink" data-pltdoc="x">subtract</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">x</span><span class="hspace">&nbsp;</span><span class="RktVar">y</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">x</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">y</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the difference of the given sets (i.e., elements in <span class="RktVar">x</span>
that are not in <span class="RktVar">y</span>).</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._union))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._union%29%29" class="RktValDef RktValLink" data-pltdoc="x">union</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">x</span><span class="hspace">&nbsp;</span><span class="RktVar">y</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">x</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">y</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the union of the given sets.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._split))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._split%29%29" class="RktValDef RktValLink" data-pltdoc="x">split</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">x</span><span class="hspace">&nbsp;</span><span class="RktVar">y</span><span class="RktPn">)</span></td><td><span class="hspace">&nbsp;</span></td><td>&rarr;</td><td><span class="hspace">&nbsp;</span></td><td><table cellspacing="0" cellpadding="0"><tr><td><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr></table></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">x</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">y</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Produces three values: the first is the intersection of <span class="RktVar">x</span> and
<span class="RktVar">y</span>, the second is the difference <span class="RktVar">x</span> remove <span class="RktVar">y</span>,
and the third is the difference <span class="RktVar">y</span> remove <span class="RktVar">x</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._complement))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._complement%29%29" class="RktValDef RktValLink" data-pltdoc="x">complement</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">s</span><span class="hspace">&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span><span class="RktVar">end</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">s</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a set containing the elements between <span class="RktVar">start</span> to
<span class="RktVar">end</span> inclusive that are not in <span class="RktVar">s</span>, where
<span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3c%7E3d%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">&lt;=</a></span><span class="stt"> </span><span class="RktSym">start-k</span><span class="stt"> </span><span class="RktSym">end-k</span><span class="RktPn">)</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._symmetric-difference))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._symmetric-difference%29%29" class="RktValDef RktValLink" data-pltdoc="x">symmetric-difference</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">x</span><span class="hspace">&nbsp;</span><span class="RktVar">y</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">x</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">y</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns an integer set containing every member of <span class="RktVar">x</span>
and <span class="RktVar">y</span> that is not in both sets.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._member~3f))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._member~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">member?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">k</span><span class="hspace">&nbsp;</span><span class="RktVar">s</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">k</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">s</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">k</span> is in <span class="RktVar">s</span>, <span class="RktVal">#f</span>
otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._get-integer))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._get-integer%29%29" class="RktValDef RktValLink" data-pltdoc="x">get-integer</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">set</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">set</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a member of <span class="RktVar">set</span>, or <span class="RktVal">#f</span> if <span class="RktVar">set</span> is empty.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._foldr))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._foldr%29%29" class="RktValDef RktValLink" data-pltdoc="x">foldr</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">proc</span><span class="hspace">&nbsp;</span><span class="RktVar">base-v</span><span class="hspace">&nbsp;</span><span class="RktVar">s</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">proc</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">base-v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">s</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Applies <span class="RktVar">proc</span> to each member of <span class="RktVar">s</span> in ascending order,
where the first argument to <span class="RktVar">proc</span> is the set member, and the
second argument is the fold result starting with <span class="RktVar">base-v</span>. For
example, <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._foldr%29%29" class="RktValLink" data-pltdoc="x">foldr</a></span><span class="stt"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._cons%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">cons</a></span><span class="stt"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._null%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">null</a></span><span class="stt"> </span><span class="RktVar">s</span><span class="RktPn">)</span> returns a list of all the
integers in <span class="RktVar">s</span>, sorted in increasing order.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._partition))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._partition%29%29" class="RktValDef RktValLink" data-pltdoc="x">partition</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">s</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">s</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the coarsest refinement of the sets in <span class="RktVar">s</span> such that
the sets in the result list are pairwise disjoint.  For example,
partitioning the sets that represent <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">2</span><span class="RktVal">)</span><span class="stt"> </span><span class="RktVal">(</span><span class="RktVal">5</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">10</span><span class="RktVal">)</span><span class="RktVal">)</span> and
<span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">(</span><span class="RktVal">2</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">2</span><span class="RktVal">)</span><span class="stt"> </span><span class="RktVal">(</span><span class="RktVal">6</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">6</span><span class="RktVal">)</span><span class="stt"> </span><span class="RktVal">(</span><span class="RktVal">12</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">12</span><span class="RktVal">)</span><span class="RktVal">)</span> produces the a list containing
the sets for <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">1</span><span class="RktVal">)</span><span class="stt"> </span><span class="RktVal">(</span><span class="RktVal">5</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">5</span><span class="RktVal">)</span><span class="stt"> </span><span class="RktVal">(</span><span class="RktVal">7</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">10</span><span class="RktVal">)</span><span class="RktVal">)</span> <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">(</span><span class="RktVal">2</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">2</span><span class="RktVal">)</span><span class="stt"> </span><span class="RktVal">(</span><span class="RktVal">6</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">6</span><span class="RktVal">)</span><span class="RktVal">)</span>, and <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">(</span><span class="RktVal">12</span><span class="stt"> </span><span class="RktVal">. </span><span class="RktVal">12</span><span class="RktVal">)</span><span class="RktVal">)</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._count))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._count%29%29" class="RktValDef RktValLink" data-pltdoc="x">count</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">s</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">s</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the number of integers in the given integer set.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/integer-set..rkt)._subset~3f))"></a><span title="Provided from: data/integer-set | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._subset~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">subset?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">x</span><span class="hspace">&nbsp;</span><span class="RktVar">y</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">x</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">y</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Finteger-set..rkt%29._integer-set~3f%29%29" class="RktValLink" data-pltdoc="x">integer-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns true if every integer in <span class="RktVar">x</span> is also in
<span class="RktVar">y</span>, otherwise <span class="RktVal">#f</span>.</div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.1&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="Binary_Heaps.html" title="backward to &quot;7 Binary Heaps&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;Data: Data Structures&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="bit-vector.html" title="forward to &quot;9 Bit Vectors&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>