/usr/share/doc/racket/reference/sets.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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | <!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>4.16 Sets</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="extras.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,"tocview_0");">►</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x"><span style="font-weight: bold">The Racket Reference</span></a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="model.html" class="tocviewlink" data-pltdoc="x">Language Model</a></td></tr><tr><td align="right">2 </td><td><a href="notation.html" class="tocviewlink" data-pltdoc="x">Notation for Documentation</a></td></tr><tr><td align="right">3 </td><td><a href="syntax.html" class="tocviewlink" data-pltdoc="x">Syntactic Forms</a></td></tr><tr><td align="right">4 </td><td><a href="data.html" class="tocviewselflink" data-pltdoc="x">Datatypes</a></td></tr><tr><td align="right">5 </td><td><a href="structures.html" class="tocviewlink" data-pltdoc="x">Structures</a></td></tr><tr><td align="right">6 </td><td><a href="mzlib_class.html" class="tocviewlink" data-pltdoc="x">Classes and Objects</a></td></tr><tr><td align="right">7 </td><td><a href="mzlib_unit.html" class="tocviewlink" data-pltdoc="x">Units</a></td></tr><tr><td align="right">8 </td><td><a href="contracts.html" class="tocviewlink" data-pltdoc="x">Contracts</a></td></tr><tr><td align="right">9 </td><td><a href="match.html" class="tocviewlink" data-pltdoc="x">Pattern Matching</a></td></tr><tr><td align="right">10 </td><td><a href="control.html" class="tocviewlink" data-pltdoc="x">Control Flow</a></td></tr><tr><td align="right">11 </td><td><a href="concurrency.html" class="tocviewlink" data-pltdoc="x">Concurrency and Parallelism</a></td></tr><tr><td align="right">12 </td><td><a href="Macros.html" class="tocviewlink" data-pltdoc="x">Macros</a></td></tr><tr><td align="right">13 </td><td><a href="input-and-output.html" class="tocviewlink" data-pltdoc="x">Input and Output</a></td></tr><tr><td align="right">14 </td><td><a href="security.html" class="tocviewlink" data-pltdoc="x">Reflection and Security</a></td></tr><tr><td align="right">15 </td><td><a href="os.html" class="tocviewlink" data-pltdoc="x">Operating System</a></td></tr><tr><td align="right">16 </td><td><a href="memory.html" class="tocviewlink" data-pltdoc="x">Memory Management</a></td></tr><tr><td align="right">17 </td><td><a href="unsafe.html" class="tocviewlink" data-pltdoc="x">Unsafe Operations</a></td></tr><tr><td align="right">18 </td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running Racket</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">▼</a></td><td>4 </td><td><a href="data.html" class="tocviewlink" data-pltdoc="x">Datatypes</a></td></tr></table><div class="tocviewsublist" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">4.1 </td><td><a href="booleans.html" class="tocviewlink" data-pltdoc="x">Booleans and Equality</a></td></tr><tr><td align="right">4.2 </td><td><a href="numbers.html" class="tocviewlink" data-pltdoc="x">Numbers</a></td></tr><tr><td align="right">4.3 </td><td><a href="strings.html" class="tocviewlink" data-pltdoc="x">Strings</a></td></tr><tr><td align="right">4.4 </td><td><a href="bytestrings.html" class="tocviewlink" data-pltdoc="x">Byte Strings</a></td></tr><tr><td align="right">4.5 </td><td><a href="characters.html" class="tocviewlink" data-pltdoc="x">Characters</a></td></tr><tr><td align="right">4.6 </td><td><a href="symbols.html" class="tocviewlink" data-pltdoc="x">Symbols</a></td></tr><tr><td align="right">4.7 </td><td><a href="regexp.html" class="tocviewlink" data-pltdoc="x">Regular Expressions</a></td></tr><tr><td align="right">4.8 </td><td><a href="keywords.html" class="tocviewlink" data-pltdoc="x">Keywords</a></td></tr><tr><td align="right">4.9 </td><td><a href="pairs.html" class="tocviewlink" data-pltdoc="x">Pairs and Lists</a></td></tr><tr><td align="right">4.10 </td><td><a href="mpairs.html" class="tocviewlink" data-pltdoc="x">Mutable Pairs and Lists</a></td></tr><tr><td align="right">4.11 </td><td><a href="vectors.html" class="tocviewlink" data-pltdoc="x">Vectors</a></td></tr><tr><td align="right">4.12 </td><td><a href="boxes.html" class="tocviewlink" data-pltdoc="x">Boxes</a></td></tr><tr><td align="right">4.13 </td><td><a href="hashtables.html" class="tocviewlink" data-pltdoc="x">Hash Tables</a></td></tr><tr><td align="right">4.14 </td><td><a href="sequences_streams.html" class="tocviewlink" data-pltdoc="x">Sequences and Streams</a></td></tr><tr><td align="right">4.15 </td><td><a href="dicts.html" class="tocviewlink" data-pltdoc="x">Dictionaries</a></td></tr><tr><td align="right">4.16 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Sets</a></td></tr><tr><td align="right">4.17 </td><td><a href="procedures.html" class="tocviewlink" data-pltdoc="x">Procedures</a></td></tr><tr><td align="right">4.18 </td><td><a href="void.html" class="tocviewlink" data-pltdoc="x">Void</a></td></tr><tr><td align="right">4.19 </td><td><a href="undefined.html" class="tocviewlink" data-pltdoc="x">Undefined</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_2");">►</a></td><td>4.16 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Sets</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">4.16.1 </td><td><a href="#%28part._.Hash_.Sets%29" class="tocviewlink" data-pltdoc="x">Hash Sets</a></td></tr><tr><td align="right">4.16.2 </td><td><a href="#%28part._.Set_.Predicates_and_.Contracts%29" class="tocviewlink" data-pltdoc="x">Set Predicates and Contracts</a></td></tr><tr><td align="right">4.16.3 </td><td><a href="#%28part._.Generic_.Set_.Interface%29" class="tocviewlink" data-pltdoc="x">Generic Set Interface</a></td></tr><tr><td align="right">4.16.4 </td><td><a href="#%28part._.Custom_.Hash_.Sets%29" class="tocviewlink" data-pltdoc="x">Custom Hash Sets</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">4.16.1<tt> </tt></span><a href="#%28part._.Hash_.Sets%29" class="tocsubseclink" data-pltdoc="x">Hash Sets</a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-equal~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>equal?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-eqv~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>eqv?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-eq~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>eq?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-mutable~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>mutable?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-weak~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>weak?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._seteqv%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">seteqv</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._seteq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">seteq</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._mutable-set%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">mutable-<wbr></wbr>set</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._mutable-seteqv%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">mutable-<wbr></wbr>seteqv</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._mutable-seteq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">mutable-<wbr></wbr>seteq</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._weak-set%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">weak-<wbr></wbr>set</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._weak-seteqv%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">weak-<wbr></wbr>seteqv</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._weak-seteq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">weak-<wbr></wbr>seteq</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3eset%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">list-<wbr></wbr>>set</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3eseteqv%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">list-<wbr></wbr>>seteqv</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3eseteq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">list-<wbr></wbr>>seteq</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3emutable-set%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">list-<wbr></wbr>>mutable-<wbr></wbr>set</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3emutable-seteqv%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">list-<wbr></wbr>>mutable-<wbr></wbr>seteqv</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3emutable-seteq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">list-<wbr></wbr>>mutable-<wbr></wbr>seteq</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3eweak-set%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">list-<wbr></wbr>>weak-<wbr></wbr>set</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3eweak-seteqv%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">list-<wbr></wbr>>weak-<wbr></wbr>seteqv</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3eweak-seteq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">list-<wbr></wbr>>weak-<wbr></wbr>seteq</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fset%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for/<span class="mywbr"> </span>set</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fseteq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for/<span class="mywbr"> </span>seteq</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fseteqv%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for/<span class="mywbr"> </span>seteqv</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fset%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for*/<span class="mywbr"> </span>set</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fseteq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for*/<span class="mywbr"> </span>seteq</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fseteqv%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for*/<span class="mywbr"> </span>seteqv</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fmutable-set%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for/<span class="mywbr"> </span>mutable-<wbr></wbr>set</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fmutable-seteq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for/<span class="mywbr"> </span>mutable-<wbr></wbr>seteq</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fmutable-seteqv%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for/<span class="mywbr"> </span>mutable-<wbr></wbr>seteqv</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fmutable-set%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for*/<span class="mywbr"> </span>mutable-<wbr></wbr>set</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fmutable-seteq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for*/<span class="mywbr"> </span>mutable-<wbr></wbr>seteq</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fmutable-seteqv%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for*/<span class="mywbr"> </span>mutable-<wbr></wbr>seteqv</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fweak-set%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for/<span class="mywbr"> </span>weak-<wbr></wbr>set</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fweak-seteq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for/<span class="mywbr"> </span>weak-<wbr></wbr>seteq</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fweak-seteqv%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for/<span class="mywbr"> </span>weak-<wbr></wbr>seteqv</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fweak-set%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for*/<span class="mywbr"> </span>weak-<wbr></wbr>set</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fweak-seteq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for*/<span class="mywbr"> </span>weak-<wbr></wbr>seteq</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fweak-seteqv%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">for*/<span class="mywbr"> </span>weak-<wbr></wbr>seteqv</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.16.2<tt> </tt></span><a href="#%28part._.Set_.Predicates_and_.Contracts%29" class="tocsubseclink" data-pltdoc="x">Set Predicates and Contracts</a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">generic-<wbr></wbr>set?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-implements~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>implements?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-implements%2Fc%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>implements/<span class="mywbr"> </span>c</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%2Fc%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set/<span class="mywbr"> </span>c</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.16.3<tt> </tt></span><a href="#%28part._.Generic_.Set_.Interface%29" class="tocsubseclink" data-pltdoc="x">Generic Set Interface</a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._gen~3aset%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">gen:<span class="mywbr"> </span>set</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.16.3.1<tt> </tt></span><a href="#%28part._set-methods%29" class="tocsubseclink" data-pltdoc="x">Set Methods</a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-member~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>member?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-add%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>add</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-add%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>add!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>remove</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>remove!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-empty~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>empty?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-count%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>count</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-first%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>first</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-rest%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>rest</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>>stream</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-copy%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>copy</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-copy-clear%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>copy-<wbr></wbr>clear</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-clear%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>clear</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-clear%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>clear!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-union%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>union</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-union%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>union!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-intersect%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>intersect</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-intersect%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>intersect!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-subtract%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>subtract</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-subtract%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>subtract!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-symmetric-difference%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>symmetric-<wbr></wbr>difference</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-symmetric-difference%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>symmetric-<wbr></wbr>difference!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3d~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set=?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._subset~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">subset?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._proper-subset~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">proper-<wbr></wbr>subset?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3elist%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>>list</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-map%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>map</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-for-each%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set-<wbr></wbr>for-<wbr></wbr>each</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._in-set%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">in-<wbr></wbr>set</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.16.4<tt> </tt></span><a href="#%28part._.Custom_.Hash_.Sets%29" class="tocsubseclink" data-pltdoc="x">Custom Hash Sets</a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._define-custom-set-types%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>custom-<wbr></wbr>set-<wbr></wbr>types</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._make-custom-set-types%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>custom-<wbr></wbr>set-<wbr></wbr>types</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><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, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="dicts.html" title="backward to "4.15 Dictionaries"" data-pltdoc="x">← prev</a> <a href="data.html" title="up to "4 Datatypes"" data-pltdoc="x">up</a> <a href="procedures.html" title="forward to "4.17 Procedures"" data-pltdoc="x">next →</a></span> </div><h4 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""sets"">4.16<tt> </tt><a name="(part._sets)"></a><a name="(mod-path._racket/set)"></a>Sets</h4><p>A <a name="(tech._set)"></a><span style="font-style: italic">set</span> represents a collection of distinct elements. The following
datatypes are all sets:</p><ul><li><p><a href="#%28tech._hash._set%29" data-pltdoc="x">hash sets</a>;</p></li><li><p><a href="pairs.html#%28tech._list%29" data-pltdoc="x">lists</a> using <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span> to compare elements; and</p></li><li><p><a href="structures.html#%28tech._structure%29" data-pltdoc="x">structures</a> whose types implement the <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._gen~3aset%29%29" class="RktStxLink" data-pltdoc="x">gen:set</a></span>
<a href="struct-generics.html#%28tech._generic._interface%29" class="techoutside" data-pltdoc="x"><span class="techinside">generic interface</span></a>.</p></li></ul><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/set</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The bindings documented in this section are provided by the <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/set</span></a> and <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket</span></a> libraries, but not <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a>.</div></p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""Hash_Sets"">4.16.1<tt> </tt><a name="(part._.Hash_.Sets)"></a>Hash Sets</h5><p>A <a name="(tech._hash._set)"></a><span style="font-style: italic">hash set</span> is a set whose elements are compared via <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span>,
<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span>, or <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span> and partitioned via <span class="RktSym"><a href="hashtables.html#%28def._%28%28quote._~23~25kernel%29._equal-hash-code%29%29" class="RktValLink" data-pltdoc="x">equal-hash-code</a></span>,
<span class="RktSym"><a href="hashtables.html#%28def._%28%28quote._~23~25kernel%29._eqv-hash-code%29%29" class="RktValLink" data-pltdoc="x">eqv-hash-code</a></span>, or <span class="RktSym"><a href="hashtables.html#%28def._%28%28quote._~23~25kernel%29._eq-hash-code%29%29" class="RktValLink" data-pltdoc="x">eq-hash-code</a></span>. A hash set is either
immutable or mutable; mutable hash sets retain their elements either strongly
or weakly.</p><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>Like operations on immutable hash tables, “constant time” hash
set operations actually require <span style="font-style: italic">O</span>(<span style="font-style: italic">log N</span>)<span style="font-style: italic"></span> time for a set of size
<span style="font-style: italic">N</span>.</p></blockquote></blockquote></blockquote><p>A hash set can be used as a <a href="streams.html#%28tech._stream%29" class="techoutside" data-pltdoc="x"><span class="techinside">stream</span></a> (see <a href="streams.html" data-pltdoc="x">Streams</a>) and thus as
a single-valued <a href="sequences.html#%28tech._sequence%29" class="techoutside" data-pltdoc="x"><span class="techinside">sequence</span></a> (see <a href="sequences.html" data-pltdoc="x">Sequences</a>). The elements of the
set serve as elements of the stream or sequence. If an element is added to or
removed from the hash set during iteration, then an iteration step may fail
with <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span>, or the iteration may skip or duplicate
elements. See also <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._in-set%29%29" class="RktValLink" data-pltdoc="x">in-set</a></span>.</p><p>Two hash sets are <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span> when they use the same element-comparison
procedure (<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span>, <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span>, or <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span>), both hold elements
strongly or weakly, have the same mutability, and have equivalent
elements. Immutable hash sets support effectively constant-time access and
update, just like mutable hash sets; the constant on immutable operations is
usually larger, but the functional nature of immutable hash sets can pay off in
certain algorithms.</p><p>All hash sets <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implement</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>,
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-empty~3f%29%29" class="RktValLink" data-pltdoc="x">set-empty?</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-member~3f%29%29" class="RktValLink" data-pltdoc="x">set-member?</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-count%29%29" class="RktValLink" data-pltdoc="x">set-count</a></span>,
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._subset~3f%29%29" class="RktValLink" data-pltdoc="x">subset?</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._proper-subset~3f%29%29" class="RktValLink" data-pltdoc="x">proper-subset?</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-map%29%29" class="RktValLink" data-pltdoc="x">set-map</a></span>,
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-for-each%29%29" class="RktValLink" data-pltdoc="x">set-for-each</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-copy%29%29" class="RktValLink" data-pltdoc="x">set-copy</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-copy-clear%29%29" class="RktValLink" data-pltdoc="x">set-copy-clear</a></span>,
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3elist%29%29" class="RktValLink" data-pltdoc="x">set->list</a></span>, and <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-first%29%29" class="RktValLink" data-pltdoc="x">set-first</a></span>. Immutable hash sets in
addition <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implement</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-add%29%29" class="RktValLink" data-pltdoc="x">set-add</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%29%29" class="RktValLink" data-pltdoc="x">set-remove</a></span>,
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-clear%29%29" class="RktValLink" data-pltdoc="x">set-clear</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-union%29%29" class="RktValLink" data-pltdoc="x">set-union</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-intersect%29%29" class="RktValLink" data-pltdoc="x">set-intersect</a></span>,
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-subtract%29%29" class="RktValLink" data-pltdoc="x">set-subtract</a></span>, and <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-symmetric-difference%29%29" class="RktValLink" data-pltdoc="x">set-symmetric-difference</a></span>. Mutable
hash sets in addition <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implement</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-add%21%29%29" class="RktValLink" data-pltdoc="x">set-add!</a></span>,
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%21%29%29" class="RktValLink" data-pltdoc="x">set-remove!</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-clear%21%29%29" class="RktValLink" data-pltdoc="x">set-clear!</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-union%21%29%29" class="RktValLink" data-pltdoc="x">set-union!</a></span>,
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-intersect%21%29%29" class="RktValLink" data-pltdoc="x">set-intersect!</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-subtract%21%29%29" class="RktValLink" data-pltdoc="x">set-subtract!</a></span>, and
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-symmetric-difference%21%29%29" class="RktValLink" data-pltdoc="x">set-symmetric-difference!</a></span>.</p><p>Operations on sets that contain elements that are mutated are
unpredictable in much the same way that <a href="hashtables.html#%28tech._hash._table%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash table</span></a> operations are
unpredictable when keys are mutated.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._set-equal~3f))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-equal~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-equal?</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._set-eqv~3f))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-eqv~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-eqv?</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._set-eq~3f))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-eq~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-eq?</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">x</span> is a <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a> that compares
elements with <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span>, <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span>, or <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span>, respectively;
returns <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><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._set~3f))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">set?</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._set-mutable~3f))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-mutable~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-mutable?</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._set-weak~3f))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-weak~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-weak?</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">x</span> is a <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a> that is respectively
immutable, mutable with strongly-held keys, or mutable with weakly-held keys;
returns <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><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._set))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValDef RktValLink" data-pltdoc="x">set</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-equal~3f%29%29" class="RktValLink" data-pltdoc="x">set-equal?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3f%29%29" class="RktValLink" data-pltdoc="x">set?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._seteqv))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._seteqv%29%29" class="RktValDef RktValLink" data-pltdoc="x">seteqv</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-eqv~3f%29%29" class="RktValLink" data-pltdoc="x">set-eqv?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3f%29%29" class="RktValLink" data-pltdoc="x">set?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._seteq))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._seteq%29%29" class="RktValDef RktValLink" data-pltdoc="x">seteq</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-eq~3f%29%29" class="RktValLink" data-pltdoc="x">set-eq?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3f%29%29" class="RktValLink" data-pltdoc="x">set?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._mutable-set))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._mutable-set%29%29" class="RktValDef RktValLink" data-pltdoc="x">mutable-set</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-equal~3f%29%29" class="RktValLink" data-pltdoc="x">set-equal?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-mutable~3f%29%29" class="RktValLink" data-pltdoc="x">set-mutable?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._mutable-seteqv))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._mutable-seteqv%29%29" class="RktValDef RktValLink" data-pltdoc="x">mutable-seteqv</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-eqv~3f%29%29" class="RktValLink" data-pltdoc="x">set-eqv?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-mutable~3f%29%29" class="RktValLink" data-pltdoc="x">set-mutable?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._mutable-seteq))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._mutable-seteq%29%29" class="RktValDef RktValLink" data-pltdoc="x">mutable-seteq</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-eq~3f%29%29" class="RktValLink" data-pltdoc="x">set-eq?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-mutable~3f%29%29" class="RktValLink" data-pltdoc="x">set-mutable?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._weak-set))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._weak-set%29%29" class="RktValDef RktValLink" data-pltdoc="x">weak-set</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-equal~3f%29%29" class="RktValLink" data-pltdoc="x">set-equal?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-weak~3f%29%29" class="RktValLink" data-pltdoc="x">set-weak?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._weak-seteqv))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._weak-seteqv%29%29" class="RktValDef RktValLink" data-pltdoc="x">weak-seteqv</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-eqv~3f%29%29" class="RktValLink" data-pltdoc="x">set-eqv?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-weak~3f%29%29" class="RktValLink" data-pltdoc="x">set-weak?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._weak-seteq))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._weak-seteq%29%29" class="RktValDef RktValLink" data-pltdoc="x">weak-seteq</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-eq~3f%29%29" class="RktValLink" data-pltdoc="x">set-eq?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-weak~3f%29%29" class="RktValLink" data-pltdoc="x">set-weak?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Creates a <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a> with the given <span class="RktVar">v</span>s as elements. The
elements are added in the order that they appear as arguments, so in the case
of sets that use <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span> or <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span>, an earlier element may be
replaced by a later element that is <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span> or <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span> but not
<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._list-~3eset))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3eset%29%29" class="RktValDef RktValLink" data-pltdoc="x">list->set</a></span></span><span class="hspace"> </span><span class="RktVar">lst</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-equal~3f%29%29" class="RktValLink" data-pltdoc="x">set-equal?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3f%29%29" class="RktValLink" data-pltdoc="x">set?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">lst</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list~3f%29%29" class="RktValLink" data-pltdoc="x">list?</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._list-~3eseteqv))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3eseteqv%29%29" class="RktValDef RktValLink" data-pltdoc="x">list->seteqv</a></span></span><span class="hspace"> </span><span class="RktVar">lst</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-eqv~3f%29%29" class="RktValLink" data-pltdoc="x">set-eqv?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3f%29%29" class="RktValLink" data-pltdoc="x">set?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">lst</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list~3f%29%29" class="RktValLink" data-pltdoc="x">list?</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._list-~3eseteq))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3eseteq%29%29" class="RktValDef RktValLink" data-pltdoc="x">list->seteq</a></span></span><span class="hspace"> </span><span class="RktVar">lst</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-eq~3f%29%29" class="RktValLink" data-pltdoc="x">set-eq?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3f%29%29" class="RktValLink" data-pltdoc="x">set?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">lst</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list~3f%29%29" class="RktValLink" data-pltdoc="x">list?</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._list-~3emutable-set))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3emutable-set%29%29" class="RktValDef RktValLink" data-pltdoc="x">list->mutable-set</a></span></span><span class="hspace"> </span><span class="RktVar">lst</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-equal~3f%29%29" class="RktValLink" data-pltdoc="x">set-equal?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-mutable~3f%29%29" class="RktValLink" data-pltdoc="x">set-mutable?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">lst</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list~3f%29%29" class="RktValLink" data-pltdoc="x">list?</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._list-~3emutable-seteqv))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3emutable-seteqv%29%29" class="RktValDef RktValLink" data-pltdoc="x">list->mutable-seteqv</a></span></span><span class="hspace"> </span><span class="RktVar">lst</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-eqv~3f%29%29" class="RktValLink" data-pltdoc="x">set-eqv?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-mutable~3f%29%29" class="RktValLink" data-pltdoc="x">set-mutable?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">lst</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list~3f%29%29" class="RktValLink" data-pltdoc="x">list?</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._list-~3emutable-seteq))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3emutable-seteq%29%29" class="RktValDef RktValLink" data-pltdoc="x">list->mutable-seteq</a></span></span><span class="hspace"> </span><span class="RktVar">lst</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-eq~3f%29%29" class="RktValLink" data-pltdoc="x">set-eq?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-mutable~3f%29%29" class="RktValLink" data-pltdoc="x">set-mutable?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">lst</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list~3f%29%29" class="RktValLink" data-pltdoc="x">list?</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._list-~3eweak-set))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3eweak-set%29%29" class="RktValDef RktValLink" data-pltdoc="x">list->weak-set</a></span></span><span class="hspace"> </span><span class="RktVar">lst</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-equal~3f%29%29" class="RktValLink" data-pltdoc="x">set-equal?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-weak~3f%29%29" class="RktValLink" data-pltdoc="x">set-weak?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">lst</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list~3f%29%29" class="RktValLink" data-pltdoc="x">list?</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._list-~3eweak-seteqv))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3eweak-seteqv%29%29" class="RktValDef RktValLink" data-pltdoc="x">list->weak-seteqv</a></span></span><span class="hspace"> </span><span class="RktVar">lst</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-eqv~3f%29%29" class="RktValLink" data-pltdoc="x">set-eqv?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-weak~3f%29%29" class="RktValLink" data-pltdoc="x">set-weak?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">lst</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list~3f%29%29" class="RktValLink" data-pltdoc="x">list?</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._racket/set..rkt)._list-~3eweak-seteq))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._list-~3eweak-seteq%29%29" class="RktValDef RktValLink" data-pltdoc="x">list->weak-seteq</a></span></span><span class="hspace"> </span><span class="RktVar">lst</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-eq~3f%29%29" class="RktValLink" data-pltdoc="x">set-eq?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-weak~3f%29%29" class="RktValLink" data-pltdoc="x">set-weak?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">lst</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list~3f%29%29" class="RktValLink" data-pltdoc="x">list?</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Creates a <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a> with the elements of the given <span class="RktVar">lst</span> as
the elements of the set. Equivalent to <span class="RktPn">(</span><span class="RktSym"><a href="procedures.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._apply%29%29" class="RktValLink" data-pltdoc="x">apply</a></span><span class="stt"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="stt"> </span><span class="RktVar">lst</span><span class="RktPn">)</span>,
<span class="RktPn">(</span><span class="RktSym"><a href="procedures.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._apply%29%29" class="RktValLink" data-pltdoc="x">apply</a></span><span class="stt"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._seteqv%29%29" class="RktValLink" data-pltdoc="x">seteqv</a></span><span class="stt"> </span><span class="RktVar">lst</span><span class="RktPn">)</span>, <span class="RktPn">(</span><span class="RktSym"><a href="procedures.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._apply%29%29" class="RktValLink" data-pltdoc="x">apply</a></span><span class="stt"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._seteq%29%29" class="RktValLink" data-pltdoc="x">seteq</a></span><span class="stt"> </span><span class="RktVar">lst</span><span class="RktPn">)</span>, and so on,
respectively.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for/set))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fset%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for/set</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for/seteq))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fseteq%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for/seteq</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for/seteqv))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fseteqv%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for/seteqv</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for*/set))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fset%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for*/set</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for*/seteq))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fseteq%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for*/seteq</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for*/seteqv))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fseteqv%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for*/seteqv</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for/mutable-set))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fmutable-set%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for/mutable-set</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for/mutable-seteq))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fmutable-seteq%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for/mutable-seteq</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for/mutable-seteqv))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fmutable-seteqv%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for/mutable-seteqv</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for*/mutable-set))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fmutable-set%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for*/mutable-set</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for*/mutable-seteq))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fmutable-seteq%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for*/mutable-seteq</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for*/mutable-seteqv))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fmutable-seteqv%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for*/mutable-seteqv</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for/weak-set))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fweak-set%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for/weak-set</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for/weak-seteq))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fweak-seteq%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for/weak-seteq</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for/weak-seteqv))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2Fweak-seteqv%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for/weak-seteqv</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for*/weak-set))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fweak-set%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for*/weak-set</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for*/weak-seteq))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fweak-seteq%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for*/weak-seteq</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._for*/weak-seteqv))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._for%2A%2Fweak-seteqv%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">for*/weak-seteqv</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">for-clause</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Analogous to <span class="RktSym"><a href="for.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._for%2Flist%29%29" class="RktStxLink" data-pltdoc="x">for/list</a></span> and <span class="RktSym"><a href="for.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._for%2A%2Flist%29%29" class="RktStxLink" data-pltdoc="x">for*/list</a></span>, but to
construct a <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a> instead of a list.</div></p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""Set_Predicates_and_Contracts"">4.16.2<tt> </tt><a name="(part._.Set_.Predicates_and_.Contracts)"></a>Set Predicates and Contracts</h5><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._racket/set..rkt)._generic-set~3f))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">generic-set?</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" 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 <a href="#%28tech._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">set</span></a>; returns <span class="RktVal">#f</span>
otherwise.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._mutable-seteq%29%29" class="RktValLink" data-pltdoc="x">mutable-seteq</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="vectors.html#%28def._%28%28quote._~23~25kernel%29._vector%29%29" class="RktValLink" data-pltdoc="x">vector</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr></table></blockquote></td></tr></table></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._racket/set..rkt)._set-implements~3f))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-implements~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-implements?</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktVar">sym</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">sym</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">st</span> implements all of the methods from
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._gen~3aset%29%29" class="RktStxLink" data-pltdoc="x">gen:set</a></span> named by the <span class="RktVar">sym</span>s; returns <span class="RktVal">#f</span> otherwise.
Fallback implementations do not affect the result; <span class="RktVar">st</span> may support the
given methods via fallback implementations yet produce <span class="RktVal">#f</span>.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-implements~3f%29%29" class="RktValLink" data-pltdoc="x">set-implements?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">set-add</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-implements~3f%29%29" class="RktValLink" data-pltdoc="x">set-implements?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">set-add!</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-implements~3f%29%29" class="RktValLink" data-pltdoc="x">set-implements?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">set-add</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-implements~3f%29%29" class="RktValLink" data-pltdoc="x">set-implements?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">set-add!</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-implements~3f%29%29" class="RktValLink" data-pltdoc="x">set-implements?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._mutable-seteq%29%29" class="RktValLink" data-pltdoc="x">mutable-seteq</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">set-add</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-implements~3f%29%29" class="RktValLink" data-pltdoc="x">set-implements?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._mutable-seteq%29%29" class="RktValLink" data-pltdoc="x">mutable-seteq</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">set-add!</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-implements~3f%29%29" class="RktValLink" data-pltdoc="x">set-implements?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._weak-seteqv%29%29" class="RktValLink" data-pltdoc="x">weak-seteqv</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">set-remove</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">set-remove!</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr></table></blockquote></td></tr></table></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._racket/set..rkt)._set-implements/c))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-implements%2Fc%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-implements/c</a></span></span><span class="hspace"> </span><span class="RktVar">sym</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="contract-utilities.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._flat-contract~3f%29%29" class="RktValLink" data-pltdoc="x">flat-contract?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">sym</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Recognizes sets that support all of the methods from <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._gen~3aset%29%29" class="RktStxLink" data-pltdoc="x">gen:set</a></span>
named by the <span class="RktVar">sym</span>s.</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._racket/set..rkt)._set/c))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%2Fc%29%29" class="RktValDef RktValLink" data-pltdoc="x">set/c</a></span></span><span class="hspace"> </span><span class="RktVar">elem/c</span><span class="hspace"> </span>[<span class="RktPn">#:cmp</span><span class="hspace"> </span><span class="RktVar">cmp</span><span class="hspace"> </span><span class="RktPn">#:kind</span><span class="hspace"> </span><span class="RktVar">kind</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="contract-utilities.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._contract~3f%29%29" class="RktValLink" data-pltdoc="x">contract?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">elem/c</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="contract-utilities.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._chaperone-contract~3f%29%29" class="RktValLink" data-pltdoc="x">chaperone-contract?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">cmp</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">dont-care</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">equal</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">eqv</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">eq</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">dont-care</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">kind</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">dont-care</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">immutable</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">mutable</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">weak</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">mutable-or-weak</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td>=</td><td><span class="hspace"> </span></td><td><span class="RktVal">'</span><span class="RktVal">dont-care</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Constructs a contract that recognizes sets whose elements match
<span class="RktSym"><a href="attaching-contracts-to-values.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fbase..rkt%29._contract%29%29" class="RktStxLink" data-pltdoc="x">contract</a></span>.</div></p><p>If <span class="RktVar">kind</span> is <span class="RktVal">'</span><span class="RktVal">immutable</span>, <span class="RktVal">'</span><span class="RktVal">mutable</span>, or
<span class="RktVal">'</span><span class="RktVal">weak</span>, the resulting contract accepts only <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash sets</span></a> that
are respectively immutable, mutable with strongly-held keys, or mutable with
weakly-held keys. If <span class="RktVar">kind</span> is <span class="RktVal">'</span><span class="RktVal">mutable-or-weak</span>, the
resulting contract accepts any mutable <span class="RktVal">"hash sets"</span>, regardless of
key-holding strength.</p><p>If <span class="RktVar">cmp</span> is <span class="RktVal">'</span><span class="RktVal">equal</span>, <span class="RktVal">'</span><span class="RktVal">eqv</span>, or <span class="RktVal">'</span><span class="RktVal">eq</span>, the
resulting contract accepts only <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash sets</span></a> that compare elements
using <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span>, <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span>, or <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span>, respectively.</p><p>If <span class="RktVar">cmp</span> is <span class="RktVal">'</span><span class="RktVal">eqv</span> or <span class="RktVal">'</span><span class="RktVal">eq</span>, then <span class="RktVar">elem/c</span> must
be a flat contract.</p><p>If <span class="RktVar">cmp</span> and <span class="RktVar">kind</span> are both <span class="RktVal">'</span><span class="RktVal">dont-care</span>, then the
resulting contract will accept any kind of set, not just <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash
sets</span></a>.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""Generic_Set_Interface"">4.16.3<tt> </tt><a name="(part._.Generic_.Set_.Interface)"></a>Generic Set Interface</h5><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>syntax</p></div></div><p class="RForeground"><a name="(form._((lib._racket/set..rkt)._gen~3aset))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._gen~3aset%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">gen:set</a></span></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="struct-generics.html#%28tech._generic._interface%29" class="techoutside" data-pltdoc="x"><span class="techinside">generic interface</span></a> (see <a href="struct-generics.html" data-pltdoc="x">Generic Interfaces</a>) that
supplies set method implementations for a structure type via the
<span class="RktPn">#:methods</span> option of <span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span> definitions. This interface can
be used to implement any of the methods documented as
<a href="#%28part._set-methods%29" data-pltdoc="x">Set Methods</a>.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span><span class="hspace"> </span><span class="RktSym">binary-set</span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktSym">integer</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:transparent</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:methods</span><span class="hspace"> </span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._gen~3aset%29%29" class="RktStxLink" data-pltdoc="x">gen:set</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-member~3f%29%29" class="RktValLink" data-pltdoc="x">set-member?</a></span><span class="hspace"> </span><span class="RktSym">st</span><span class="hspace"> </span><span class="RktSym">i</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._bitwise-bit-set~3f%29%29" class="RktValLink" data-pltdoc="x">bitwise-bit-set?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">binary-set-integer</span><span class="hspace"> </span><span class="RktSym">st</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">i</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-add%29%29" class="RktValLink" data-pltdoc="x">set-add</a></span><span class="hspace"> </span><span class="RktSym">st</span><span class="hspace"> </span><span class="RktSym">i</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">binary-set</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._bitwise-ior%29%29" class="RktValLink" data-pltdoc="x">bitwise-ior</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">binary-set-integer</span><span class="hspace"> </span><span class="RktSym">st</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._arithmetic-shift%29%29" class="RktValLink" data-pltdoc="x">arithmetic-shift</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktSym">i</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%29%29" class="RktValLink" data-pltdoc="x">set-remove</a></span><span class="hspace"> </span><span class="RktSym">st</span><span class="hspace"> </span><span class="RktSym">i</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">binary-set</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._bitwise-and%29%29" class="RktValLink" data-pltdoc="x">bitwise-and</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">binary-set-integer</span><span class="hspace"> </span><span class="RktSym">st</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._bitwise-not%29%29" class="RktValLink" data-pltdoc="x">bitwise-not</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._arithmetic-shift%29%29" class="RktValLink" data-pltdoc="x">arithmetic-shift</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktSym">i</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">bset</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">binary-set</span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktSym">bset</span></td></tr><tr><td><p><span class="RktRes">(binary-set 5)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym">bset</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-member~3f%29%29" class="RktValLink" data-pltdoc="x">set-member?</a></span><span class="hspace"> </span><span class="RktSym">bset</span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-member~3f%29%29" class="RktValLink" data-pltdoc="x">set-member?</a></span><span class="hspace"> </span><span class="RktSym">bset</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-member~3f%29%29" class="RktValLink" data-pltdoc="x">set-member?</a></span><span class="hspace"> </span><span class="RktSym">bset</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-add%29%29" class="RktValLink" data-pltdoc="x">set-add</a></span><span class="hspace"> </span><span class="RktSym">bset</span><span class="hspace"> </span><span class="RktVal">4</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(binary-set 21)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%29%29" class="RktValLink" data-pltdoc="x">set-remove</a></span><span class="hspace"> </span><span class="RktSym">bset</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(binary-set 1)</span></p></td></tr></table></blockquote></td></tr></table></p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""set-methods"">4.16.3.1<tt> </tt><a name="(part._set-methods)"></a>Set Methods</h5><p>The methods of <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._gen~3aset%29%29" class="RktStxLink" data-pltdoc="x">gen:set</a></span> can be classified into three categories, as determined by their fallback implementations:</p><ol><li><p>methods with no fallbacks,</p></li><li><p>methods whose fallbacks depend on other, non-fallback methods,</p></li><li><p>and methods whose fallbacks can depend on either fallback or non-fallback methods.</p></li></ol><p>As an example, implementing the following methods would guarantee that all the methods in <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._gen~3aset%29%29" class="RktStxLink" data-pltdoc="x">gen:set</a></span> would at least have a fallback method:</p><ul><li><p><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-member~3f%29%29" class="RktValLink" data-pltdoc="x">set-member?</a></span></p></li><li><p><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-add%29%29" class="RktValLink" data-pltdoc="x">set-add</a></span></p></li><li><p><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-add%21%29%29" class="RktValLink" data-pltdoc="x">set-add!</a></span></p></li><li><p><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%29%29" class="RktValLink" data-pltdoc="x">set-remove</a></span></p></li><li><p><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%21%29%29" class="RktValLink" data-pltdoc="x">set-remove!</a></span></p></li><li><p><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-first%29%29" class="RktValLink" data-pltdoc="x">set-first</a></span></p></li><li><p><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-empty~3f%29%29" class="RktValLink" data-pltdoc="x">set-empty?</a></span></p></li></ul><p>There may be other such subsets of methods that would guarantee at least a fallback for every method.</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._racket/set..rkt)._set-member~3f))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-member~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-member?</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" 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 in <span class="RktVar">st</span>, <span class="RktVal">#f</span>
otherwise. Has no fallback.</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._racket/set..rkt)._set-add))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-add%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-add</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a set that includes <span class="RktVar">v</span> plus all elements of
<span class="RktVar">st</span>. This operation runs in constant time for <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash sets</span></a>. Has no fallback.</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._racket/set..rkt)._set-add!))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-add%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-add!</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Adds the element <span class="RktVar">v</span> to <span class="RktVar">st</span>. This operation runs in constant
time for <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash sets</span></a>. Has no fallback.</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._racket/set..rkt)._set-remove))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-remove</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a set that includes all elements of <span class="RktVar">st</span> except
<span class="RktVar">v</span>. This operation runs in constant time for <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash sets</span></a>. Has no fallback.</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._racket/set..rkt)._set-remove!))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-remove!</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Adds the element <span class="RktVar">v</span> to <span class="RktVar">st</span>. This operation runs in constant
time for <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash sets</span></a>. Has no fallback.</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._racket/set..rkt)._set-empty~3f))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-empty~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-empty?</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">st</span> has no members; returns <span class="RktVal">#f</span>
otherwise.</div></p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span> or
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-count%29%29" class="RktValLink" data-pltdoc="x">set-count</a></span>.</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._racket/set..rkt)._set-count))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-count%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-count</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the number of elements in <span class="RktVar">st</span>.</div></p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</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._racket/set..rkt)._set-first))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-first%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-first</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._not%2Fc%29%29" class="RktValLink" data-pltdoc="x">not/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-empty~3f%29%29" class="RktValLink" data-pltdoc="x">set-empty?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Produces an unspecified element of <span class="RktVar">st</span>. Multiple uses of
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-first%29%29" class="RktValLink" data-pltdoc="x">set-first</a></span> on <span class="RktVar">st</span> produce the same result.</div></p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</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._racket/set..rkt)._set-rest))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-rest%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-rest</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._not%2Fc%29%29" class="RktValLink" data-pltdoc="x">not/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-empty~3f%29%29" class="RktValLink" data-pltdoc="x">set-empty?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a set that includes all elements of <span class="RktVar">st</span> except
<span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-first%29%29" class="RktValLink" data-pltdoc="x">set-first</a></span><span class="stt"> </span><span class="RktVar">st</span><span class="RktPn">)</span>.</div></p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%29%29" class="RktValLink" data-pltdoc="x">set-remove</a></span> and either
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-first%29%29" class="RktValLink" data-pltdoc="x">set-first</a></span> or <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</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._racket/set..rkt)._set-~3estream))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValDef RktValLink" data-pltdoc="x">set->stream</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="streams.html#%28def._%28%28lib._racket%2Fstream..rkt%29._stream~3f%29%29" class="RktValLink" data-pltdoc="x">stream?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a stream containing the elements of <span class="RktVar">st</span>.</div></p><p><div class="SIntrapara">Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a>:
</div><div class="SIntrapara"><ul><li><p><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3elist%29%29" class="RktValLink" data-pltdoc="x">set->list</a></span></p></li><li><p><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._in-set%29%29" class="RktValLink" data-pltdoc="x">in-set</a></span></p></li><li><p><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-empty~3f%29%29" class="RktValLink" data-pltdoc="x">set-empty?</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-first%29%29" class="RktValLink" data-pltdoc="x">set-first</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-rest%29%29" class="RktValLink" data-pltdoc="x">set-rest</a></span></p></li><li><p><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-empty~3f%29%29" class="RktValLink" data-pltdoc="x">set-empty?</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-first%29%29" class="RktValLink" data-pltdoc="x">set-first</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%29%29" class="RktValLink" data-pltdoc="x">set-remove</a></span></p></li><li><p><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-count%29%29" class="RktValLink" data-pltdoc="x">set-count</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-first%29%29" class="RktValLink" data-pltdoc="x">set-first</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-rest%29%29" class="RktValLink" data-pltdoc="x">set-rest</a></span></p></li><li><p><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-count%29%29" class="RktValLink" data-pltdoc="x">set-count</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-first%29%29" class="RktValLink" data-pltdoc="x">set-first</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%29%29" class="RktValLink" data-pltdoc="x">set-remove</a></span></p></li></ul></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._racket/set..rkt)._set-copy))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-copy%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-copy</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a new, mutable set of the same type and with the same elements as
<span class="RktVar">st</span>.</div></p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span> and
either <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-copy-clear%29%29" class="RktValLink" data-pltdoc="x">set-copy-clear</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-add%21%29%29" class="RktValLink" data-pltdoc="x">set-add!</a></span>.</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._racket/set..rkt)._set-copy-clear))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-copy-clear%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-copy-clear</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-empty~3f%29%29" class="RktValLink" data-pltdoc="x">set-empty?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a new, empty set of the same type, mutability, and key strength as
<span class="RktVar">st</span>.</div></p><p>A difference between <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-copy-clear%29%29" class="RktValLink" data-pltdoc="x">set-copy-clear</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-clear%29%29" class="RktValLink" data-pltdoc="x">set-clear</a></span> is
that the latter conceptually iterates <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%29%29" class="RktValLink" data-pltdoc="x">set-remove</a></span> on the given
set, and so it preserves any contract on the given set. The
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-copy-clear%29%29" class="RktValLink" data-pltdoc="x">set-copy-clear</a></span> function produces a new set without any
contracts.</p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%29%29" class="RktValLink" data-pltdoc="x">set-remove</a></span> and <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a>
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</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._racket/set..rkt)._set-clear))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-clear%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-clear</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-empty~3f%29%29" class="RktValLink" data-pltdoc="x">set-empty?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Produces set by removing all elements of <span class="RktVar">st</span>.</div></p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%29%29" class="RktValLink" data-pltdoc="x">set-remove</a></span> and <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a>
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</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._racket/set..rkt)._set-clear!))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-clear%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-clear!</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Removes all elements from <span class="RktVar">st</span>.</div></p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%21%29%29" class="RktValLink" data-pltdoc="x">set-remove!</a></span> and either
<a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span> or <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-first%29%29" class="RktValLink" data-pltdoc="x">set-first</a></span> and either <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-count%29%29" class="RktValLink" data-pltdoc="x">set-count</a></span> or <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-empty~3f%29%29" class="RktValLink" data-pltdoc="x">set-empty?</a></span>.</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._racket/set..rkt)._set-union))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-union%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-union</a></span></span><span class="hspace"> </span><span class="RktVar">st0</span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st0</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a set of the same type as <span class="RktVar">st0</span> that includes the elements from
<span class="RktVar">st0</span> and all of the <span class="RktVar">st</span>s.</div></p><p>If <span class="RktVar">st0</span> is a list, each <span class="RktVar">st</span> must also be a list. This
operation runs on lists in time proportional to the total size of the
<span class="RktVar">st</span>s times the size of the result.</p><p>If <span class="RktVar">st0</span> is a <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a>, each <span class="RktVar">st</span> must also be a
<a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a> that uses the same comparison function (<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span>,
<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span>, or <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span>). The mutability and key strength of the hash
sets may differ. This operation runs on hash sets in time proportional to the
total size of all of the sets except the largest immutable set.</p><p>At least one set must be provided to <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-union%29%29" class="RktValLink" data-pltdoc="x">set-union</a></span> to determine the type
of the resulting set (list, hash set, etc.). If there is a case where
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-union%29%29" class="RktValLink" data-pltdoc="x">set-union</a></span> may be applied to zero arguments, instead pass an empty set
of the intended type as the first argument.</p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-add%29%29" class="RktValLink" data-pltdoc="x">set-add</a></span> and <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-union%29%29" class="RktValLink" data-pltdoc="x">set-union</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(set)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-union%29%29" class="RktValLink" data-pltdoc="x">set-union</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._seteq%29%29" class="RktValLink" data-pltdoc="x">seteq</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(seteq)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-union%29%29" class="RktValLink" data-pltdoc="x">set-union</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(set 1 2 3)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-union%29%29" class="RktValLink" data-pltdoc="x">set-union</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(3 1 2)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-union%29%29" class="RktValLink" data-pltdoc="x">set-union</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._seteq%29%29" class="RktValLink" data-pltdoc="x">seteq</a></span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">set-union: set arguments have incompatible equivalence</span></p></td></tr><tr><td><p><span class="RktErr">predicates</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">first set: (set 1 2)</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">incompatible set: (seteq 2 3)</span></p></td></tr><tr><td><span class="RktCmt">;</span><span class="RktCmt"> </span><span class="RktCmt">Sets of different types cannot be unioned.</span></td></tr></table></blockquote></td></tr></table></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._racket/set..rkt)._set-union!))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-union%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-union!</a></span></span><span class="hspace"> </span><span class="RktVar">st0</span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st0</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Adds the elements from all of the <span class="RktVar">st</span>s to <span class="RktVar">st0</span>.</div></p><p>If <span class="RktVar">st0</span> is a <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a>, each <span class="RktVar">st</span> must also be a
<a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a> that uses the same comparison function (<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span>,
<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span>, or <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span>). The mutability and key strength of the hash
sets may differ. This operation runs on hash sets in time proportional to the
total size of the <span class="RktVar">st</span>s.</p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-add%21%29%29" class="RktValLink" data-pltdoc="x">set-add!</a></span> and <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</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._racket/set..rkt)._set-intersect))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-intersect%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-intersect</a></span></span><span class="hspace"> </span><span class="RktVar">st0</span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st0</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a set of the same type as <span class="RktVar">st0</span> that includes the elements from
<span class="RktVar">st0</span> that are also contained by all of the <span class="RktVar">st</span>s.</div></p><p>If <span class="RktVar">st0</span> is a list, each <span class="RktVar">st</span> must also be a list. This
operation runs on lists in time proportional to the total size of the
<span class="RktVar">st</span>s times the size of <span class="RktVar">st0</span>.</p><p>If <span class="RktVar">st0</span> is a <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a>, each <span class="RktVar">st</span> must also be a
<a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a> that uses the same comparison function (<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span>,
<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span>, or <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span>). The mutability and key strength of the hash
sets may differ. This operation runs on hash sets in time proportional to the
size of the smallest immutable set.</p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a> either <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%29%29" class="RktValLink" data-pltdoc="x">set-remove</a></span> or
both <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-clear%29%29" class="RktValLink" data-pltdoc="x">set-clear</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-add%29%29" class="RktValLink" data-pltdoc="x">set-add</a></span>, and <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</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._racket/set..rkt)._set-intersect!))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-intersect%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-intersect!</a></span></span><span class="hspace"> </span><span class="RktVar">st0</span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st0</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Removes every element from <span class="RktVar">st0</span> that is not contained by all of the
<span class="RktVar">st</span>s.</div></p><p>If <span class="RktVar">st0</span> is a <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a>, each <span class="RktVar">st</span> must also be a
<a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a> that uses the same comparison function (<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span>,
<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span>, or <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span>). The mutability and key strength of the hash
sets may differ. This operation runs on hash sets in time proportional to the
size of <span class="RktVar">st0</span>.</p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%21%29%29" class="RktValLink" data-pltdoc="x">set-remove!</a></span> and <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</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._racket/set..rkt)._set-subtract))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-subtract%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-subtract</a></span></span><span class="hspace"> </span><span class="RktVar">st0</span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st0</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a set of the same type as <span class="RktVar">st0</span> that includes the elements from
<span class="RktVar">st0</span> that not contained by any of the <span class="RktVar">st</span>s.</div></p><p>If <span class="RktVar">st0</span> is a list, each <span class="RktVar">st</span> must also be a list. This
operation runs on lists in time proportional to the total size of the
<span class="RktVar">st</span>s times the size of <span class="RktVar">st0</span>.</p><p>If <span class="RktVar">st0</span> is a <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a>, each <span class="RktVar">st</span> must also be a
<a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a> that uses the same comparison function (<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span>,
<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span>, or <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span>). The mutability and key strength of the hash
sets may differ. This operation runs on hash sets in time proportional to the
size of <span class="RktVar">st0</span>.</p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a> either <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%29%29" class="RktValLink" data-pltdoc="x">set-remove</a></span> or
both <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-clear%29%29" class="RktValLink" data-pltdoc="x">set-clear</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-add%29%29" class="RktValLink" data-pltdoc="x">set-add</a></span>, and <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</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._racket/set..rkt)._set-subtract!))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-subtract%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-subtract!</a></span></span><span class="hspace"> </span><span class="RktVar">st0</span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st0</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Removes every element from <span class="RktVar">st0</span> that is contained by any of the
<span class="RktVar">st</span>s.</div></p><p>If <span class="RktVar">st0</span> is a <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a>, each <span class="RktVar">st</span> must also be a
<a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a> that uses the same comparison function (<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span>,
<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span>, or <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span>). The mutability and key strength of the hash
sets may differ. This operation runs on hash sets in time proportional to the
size of <span class="RktVar">st0</span>.</p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%21%29%29" class="RktValLink" data-pltdoc="x">set-remove!</a></span> and <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</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._racket/set..rkt)._set-symmetric-difference))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-symmetric-difference%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-symmetric-difference</a></span></span><span class="hspace"> </span><span class="RktVar">st0</span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st0</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a set of the same type as <span class="RktVar">st0</span> that includes all of the
elements contained an even number of times in <span class="RktVar">st0</span> and the
<span class="RktVar">st</span>s.</div></p><p>If <span class="RktVar">st0</span> is a list, each <span class="RktVar">st</span> must also be a list. This
operation runs on lists in time proportional to the total size of the
<span class="RktVar">st</span>s times the size of <span class="RktVar">st0</span>.</p><p>If <span class="RktVar">st0</span> is a <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a>, each <span class="RktVar">st</span> must also be a
<a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a> that uses the same comparison function (<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span>,
<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span>, or <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span>). The mutability and key strength of the hash
sets may differ. This operation runs on hash sets in time proportional to the
total size of all of the sets except the largest immutable set.</p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%29%29" class="RktValLink" data-pltdoc="x">set-remove</a></span> or both <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-clear%29%29" class="RktValLink" data-pltdoc="x">set-clear</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-add%29%29" class="RktValLink" data-pltdoc="x">set-add</a></span>, and <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-symmetric-difference%29%29" class="RktValLink" data-pltdoc="x">set-symmetric-difference</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(set 1 3)</span></p></td></tr></table></blockquote></td></tr></table></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._racket/set..rkt)._set-symmetric-difference!))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-symmetric-difference%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-symmetric-difference!</a></span></span><span class="hspace"> </span><span class="RktVar">st0</span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st0</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Adds and removes elements of <span class="RktVar">st0</span> so that it includes all of the
elements contained an even number of times in the <span class="RktVar">st</span>s and the
original contents of <span class="RktVar">st0</span>.</div></p><p>If <span class="RktVar">st0</span> is a <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a>, each <span class="RktVar">st</span> must also be a
<a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a> that uses the same comparison function (<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span>,
<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span>, or <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span>). The mutability and key strength of the hash
sets may differ. This operation runs on hash sets in time proportional to the
total size of the <span class="RktVar">st</span>s.</p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%21%29%29" class="RktValLink" data-pltdoc="x">set-remove!</a></span> and <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</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._racket/set..rkt)._set~3d~3f))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3d~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">set=?</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktVar">st2</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st2</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">st</span> and <span class="RktVar">st2</span> contain the same
members; returns <span class="RktVal">#f</span> otherwise.</div></p><p>If <span class="RktSym">st0</span> is a list, each <span class="RktVar">st</span> must also be a list. This
operation runs on lists in time proportional to the size of <span class="RktVar">st</span> times
the size of <span class="RktVar">st2</span>.</p><p>If <span class="RktSym">st0</span> is a <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a>, each <span class="RktVar">st</span> must also be a
<a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a> that uses the same comparison function (<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span>,
<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span>, or <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span>). The mutability and key strength of the hash
sets may differ. This operation runs on hash sets in time proportional to the
size of <span class="RktVar">st</span> plus the size of <span class="RktVar">st2</span>.</p><p>Supported for any <span class="RktVar">st</span> and <span class="RktVar">st2</span> that both <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">support</span></a>
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._subset~3f%29%29" class="RktValLink" data-pltdoc="x">subset?</a></span>; also supported for any if <span class="RktVar">st2</span> that <a href="struct-generics.html#%28tech._implemented._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">implements</span></a>
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3d~3f%29%29" class="RktValLink" data-pltdoc="x">set=?</a></span> regardless of <span class="RktVar">st</span>.</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3d~3f%29%29" class="RktValLink" data-pltdoc="x">set=?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3d~3f%29%29" class="RktValLink" data-pltdoc="x">set=?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3d~3f%29%29" class="RktValLink" data-pltdoc="x">set=?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3d~3f%29%29" class="RktValLink" data-pltdoc="x">set=?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3d~3f%29%29" class="RktValLink" data-pltdoc="x">set=?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._seteq%29%29" class="RktValLink" data-pltdoc="x">seteq</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._mutable-seteq%29%29" class="RktValLink" data-pltdoc="x">mutable-seteq</a></span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3d~3f%29%29" class="RktValLink" data-pltdoc="x">set=?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._seteq%29%29" class="RktValLink" data-pltdoc="x">seteq</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._seteqv%29%29" class="RktValLink" data-pltdoc="x">seteqv</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">set=?: set arguments have incompatible equivalence</span></p></td></tr><tr><td><p><span class="RktErr">predicates</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">first set: (seteq 1 2)</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">incompatible set: (seteqv 1 2)</span></p></td></tr><tr><td><span class="RktCmt">;</span><span class="RktCmt"> </span><span class="RktCmt">Sets of different types cannot
be compared.</span></td></tr></table></blockquote></td></tr></table></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._racket/set..rkt)._subset~3f))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._subset~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">subset?</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktVar">st2</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st2</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">st2</span> contains every member of <span class="RktVar">st</span>;
returns <span class="RktVal">#f</span> otherwise.</div></p><p>If <span class="RktSym">st0</span> is a list, each <span class="RktVar">st</span> must also be a list. This
operation runs on lists in time proportional to the size of <span class="RktVar">st</span> times
the size of <span class="RktVar">st2</span>.</p><p>If <span class="RktSym">st0</span> is a <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a>, each <span class="RktVar">st</span> must also be a
<a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a> that uses the same comparison function (<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span>,
<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span>, or <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span>). The mutability and key strength of the hash
sets may differ. This operation runs on hash sets in time proportional to the
size of <span class="RktVar">st</span>.</p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._subset~3f%29%29" class="RktValLink" data-pltdoc="x">subset?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._subset~3f%29%29" class="RktValLink" data-pltdoc="x">subset?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._subset~3f%29%29" class="RktValLink" data-pltdoc="x">subset?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr></table></blockquote></td></tr></table></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._racket/set..rkt)._proper-subset~3f))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._proper-subset~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">proper-subset?</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktVar">st2</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st2</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">st2</span> contains every member of <span class="RktVar">st</span> and at
least one additional element; returns <span class="RktVal">#f</span> otherwise.</div></p><p>If <span class="RktSym">st0</span> is a list, each <span class="RktVar">st</span> must also be a list. This
operation runs on lists in time proportional to the size of <span class="RktVar">st</span> times
the size of <span class="RktVar">st2</span>.</p><p>If <span class="RktSym">st0</span> is a <a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a>, each <span class="RktVar">st</span> must also be a
<a href="#%28tech._hash._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash set</span></a> that uses the same comparison function (<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span>,
<span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span>, or <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span>). The mutability and key strength of the hash
sets may differ. This operation runs on hash sets in time proportional to the
size of <span class="RktVar">st</span> plus the size of <span class="RktVar">st2</span>.</p><p>Supported for any <span class="RktVar">st</span> and <span class="RktVar">st2</span> that both <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">support</span></a>
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._subset~3f%29%29" class="RktValLink" data-pltdoc="x">subset?</a></span>.</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._proper-subset~3f%29%29" class="RktValLink" data-pltdoc="x">proper-subset?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._proper-subset~3f%29%29" class="RktValLink" data-pltdoc="x">proper-subset?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._proper-subset~3f%29%29" class="RktValLink" data-pltdoc="x">proper-subset?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set%29%29" class="RktValLink" data-pltdoc="x">set</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr></table></blockquote></td></tr></table></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._racket/set..rkt)._set-~3elist))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3elist%29%29" class="RktValDef RktValLink" data-pltdoc="x">set->list</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list~3f%29%29" class="RktValLink" data-pltdoc="x">list?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a list containing the elements of <span class="RktVar">st</span>.</div></p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</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._racket/set..rkt)._set-map))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-map%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-map</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktVar">proc</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">proc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Applies the procedure <span class="RktVar">proc</span> to each element in
<span class="RktVar">st</span> in an unspecified order, accumulating the results
into a list.</div></p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</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._racket/set..rkt)._set-for-each))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-for-each%29%29" class="RktValDef RktValLink" data-pltdoc="x">set-for-each</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span><span class="RktVar">proc</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">proc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Applies <span class="RktVar">proc</span> to each element in <span class="RktVar">st</span> (for the
side-effects of <span class="RktVar">proc</span>) in an unspecified order.</div></p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</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._racket/set..rkt)._in-set))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._in-set%29%29" class="RktValDef RktValLink" data-pltdoc="x">in-set</a></span></span><span class="hspace"> </span><span class="RktVar">st</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="sequences.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._sequence~3f%29%29" class="RktValLink" data-pltdoc="x">sequence?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">st</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Explicitly converts a set to a sequence for use with <span class="RktSym"><a href="for.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._for%29%29" class="RktStxLink" data-pltdoc="x">for</a></span> and
other forms.</div></p><p>Supported for any <span class="RktVar">st</span> that <a href="struct-generics.html#%28tech._supported._generic._method%29" class="techoutside" data-pltdoc="x"><span class="techinside">supports</span></a> <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-~3estream%29%29" class="RktValLink" data-pltdoc="x">set->stream</a></span>.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""Custom_Hash_Sets"">4.16.4<tt> </tt><a name="(part._.Custom_.Hash_.Sets)"></a>Custom Hash Sets</h5><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>syntax</p></div></div><table cellspacing="0" cellpadding="0" class="RktBlk RForeground"><tr><td><span class="RktPn">(</span><a name="(form._((lib._racket/set..rkt)._define-custom-set-types))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._define-custom-set-types%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define-custom-set-types</a></span></span><span class="hspace"> </span><span class="RktVar">name</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">optional-predicate</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">comparison-expr</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">optional-hash-functions</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">optional-predicate</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:elem?</span><span class="hspace"> </span><span class="RktVar">predicate-expr</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="RktVar">optional-hash-functions</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">hash1-expr</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">hash1-expr</span><span class="hspace"> </span><span class="RktVar">hash2-expr</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Creates a new set type based on the given comparison <span class="RktVar">comparison-expr</span>,
hash functions <span class="RktVar">hash1-expr</span> and <span class="RktVar">hash2-expr</span>, and element
predicate <span class="RktVar">predicate-expr</span>; the interfaces for these functions are the
same as in <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._make-custom-set-types%29%29" class="RktValLink" data-pltdoc="x">make-custom-set-types</a></span>. The new set type has three
variants: immutable, mutable with strongly-held elements, and mutable with
weakly-held elements.</div></p><p>Defines seven names:</p><ul><li><p><span class="RktVar">name</span><span class="RktSym">?</span> recognizes instances of the new type,</p></li><li><p><span class="RktSym">immutable-</span><span class="RktVar">name</span><span class="RktSym">?</span> recognizes
immutable instances of the new type,</p></li><li><p><span class="RktSym">mutable-</span><span class="RktVar">name</span><span class="RktSym">?</span> recognizes
mutable instances of the new type with strongly-held elements,</p></li><li><p><span class="RktSym">weak-</span><span class="RktVar">name</span><span class="RktSym">?</span> recognizes
mutable instances of the new type with weakly-held elements,</p></li><li><p><span class="RktSym">make-immutable-</span><span class="RktVar">name</span> constructs
immutable instances of the new type,</p></li><li><p><span class="RktSym">make-mutable-</span><span class="RktVar">name</span> constructs
mutable instances of the new type with strongly-held elements, and</p></li><li><p><span class="RktSym">make-weak-</span><span class="RktVar">name</span> constructs
mutable instances of the new type with weakly-held elements.</p></li></ul><p>The constructors all accept a stream as an optional argument, providing
initial elements.</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fset..rkt%29._define-custom-set-types%29%29" class="RktStxLink" data-pltdoc="x">define-custom-set-types</a></span><span class="hspace"> </span><span class="RktSym">string-set</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:elem?</span><span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3d~3f%29%29" class="RktValLink" data-pltdoc="x">string=?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string-length%29%29" class="RktValLink" data-pltdoc="x">string-length</a></span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">imm</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">make-immutable-string-set</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">"apple"</span><span class="hspace"> </span><span class="RktVal">"banana"</span><span class="RktVal">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">mut</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">make-mutable-string-set</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">"apple"</span><span class="hspace"> </span><span class="RktVal">"banana"</span><span class="RktVal">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym">imm</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="hspace"> </span><span class="RktSym">mut</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">string-set?</span><span class="hspace"> </span><span class="RktSym">imm</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">string-set?</span><span class="hspace"> </span><span class="RktSym">mut</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">immutable-string-set?</span><span class="hspace"> </span><span class="RktSym">imm</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">immutable-string-set?</span><span class="hspace"> </span><span class="RktSym">mut</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-member~3f%29%29" class="RktValLink" data-pltdoc="x">set-member?</a></span><span class="hspace"> </span><span class="RktSym">imm</span><span class="hspace"> </span><span class="RktVal">"apple"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-member~3f%29%29" class="RktValLink" data-pltdoc="x">set-member?</a></span><span class="hspace"> </span><span class="RktSym">mut</span><span class="hspace"> </span><span class="RktVal">"banana"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span><span class="hspace"> </span><span class="RktSym">imm</span><span class="hspace"> </span><span class="RktSym">mut</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set~3d~3f%29%29" class="RktValLink" data-pltdoc="x">set=?</a></span><span class="hspace"> </span><span class="RktSym">imm</span><span class="hspace"> </span><span class="RktSym">mut</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%21%29%29" class="RktValLink" data-pltdoc="x">set-remove!</a></span><span class="hspace"> </span><span class="RktSym">mut</span><span class="hspace"> </span><span class="RktVal">"banana"</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-member~3f%29%29" class="RktValLink" data-pltdoc="x">set-member?</a></span><span class="hspace"> </span><span class="RktSym">mut</span><span class="hspace"> </span><span class="RktVal">"banana"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%29%29" class="RktValLink" data-pltdoc="x">set-remove</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._set-remove%29%29" class="RktValLink" data-pltdoc="x">set-remove</a></span><span class="hspace"> </span><span class="RktSym">imm</span><span class="hspace"> </span><span class="RktVal">"apple"</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">"banana"</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">make-immutable-string-set</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr></table></blockquote></td></tr></table></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._racket/set..rkt)._make-custom-set-types))"></a><span title="Provided from: racket/set, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._make-custom-set-types%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-custom-set-types</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">eql?</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span>[</td><td><span class="RktVar">hash1</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">hash2</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:elem?</span><span class="hspace"> </span><span class="RktVar">elem?</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:name</span><span class="hspace"> </span><span class="RktVar">name</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:for</span><span class="hspace"> </span><span class="RktVar">who</span>]<span class="RktPn">)</span></td><td><span class="hspace"> </span></td></tr></table></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%2A%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span>*</a></span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">]</span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktSym"><a href="streams.html#%28def._%28%28lib._racket%2Fstream..rkt%29._stream~3f%29%29" class="RktValLink" data-pltdoc="x">stream?</a></span><span class="RktPn">]</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%2A%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span>*</a></span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">]</span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktSym"><a href="streams.html#%28def._%28%28lib._racket%2Fstream..rkt%29._stream~3f%29%29" class="RktValLink" data-pltdoc="x">stream?</a></span><span class="RktPn">]</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%2A%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span>*</a></span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">]</span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktSym"><a href="streams.html#%28def._%28%28lib._racket%2Fstream..rkt%29._stream~3f%29%29" class="RktValLink" data-pltdoc="x">stream?</a></span><span class="RktPn">]</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fset..rkt%29._generic-set~3f%29%29" class="RktValLink" data-pltdoc="x">generic-set?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">eql?</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">hash1</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-integer?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-integer?</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-integer?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td>=</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="procedures.html#%28def._%28%28lib._racket%2Ffunction..rkt%29._const%29%29" class="RktValLink" data-pltdoc="x">const</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">hash2</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-integer?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-integer?</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-integer?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td>=</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="procedures.html#%28def._%28%28lib._racket%2Ffunction..rkt%29._const%29%29" class="RktValLink" data-pltdoc="x">const</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">elem?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="procedures.html#%28def._%28%28lib._racket%2Ffunction..rkt%29._const%29%29" class="RktValLink" data-pltdoc="x">const</a></span><span class="hspace"> </span><span class="RktVal">#true</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">custom-set</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">who</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">make-custom-set-types</span></td></tr></table></blockquote></div><div class="SIntrapara">Creates a new set type based on the given comparison function <span class="RktVar">eql?</span>,
hash functions <span class="RktVar">hash1</span> and <span class="RktVar">hash2</span>, and predicate <span class="RktVar">elem?</span>.
The new set type has variants that are immutable, mutable with strongly-held
elements, and mutable with weakly-held elements. The given <span class="RktVar">name</span> is
used when printing instances of the new set type, and the symbol <span class="RktVar">who</span>
is used for reporting errors.</div></p><p>The comparison function <span class="RktVar">eql?</span> may accept 2 or 3 arguments. If it
accepts 2 arguments, it given two elements to compare them. If it accepts 3
arguments and does not accept 2 arguments, it is also given a recursive
comparison function that handles data cycles when comparing sub-parts of the
elements.</p><p>The hash functions <span class="RktVar">hash1</span> and <span class="RktVar">hash2</span> may accept 1 or 2
arguments. If either hash function accepts 1 argument, it is applied to a
element to compute the corresponding hash value. If either hash function
accepts 2 arguments and does not accept 1 argument, it is also given a
recursive hash function that handles data cycles when computing hash values of
sub-parts of the elements.</p><p>The predicate <span class="RktVar">elem?</span> must accept 1 argument and is used to recognize
valid elements for the new set type.</p><p>Produces seven values:</p><ul><li><p>a predicate recognizing all instances of the new set type,</p></li><li><p>a predicate recognizing immutable instances,</p></li><li><p>a predicate recognizing mutable instances,</p></li><li><p>a predicate recognizing weak instances,</p></li><li><p>a constructor for immutable instances,</p></li><li><p>a constructor for mutable instances, and</p></li><li><p>a constructor for weak instances.</p></li></ul><p>See <span class="RktSym"><a href="dicts.html#%28form._%28%28lib._racket%2Fdict..rkt%29._define-custom-hash-types%29%29" class="RktStxLink" data-pltdoc="x">define-custom-hash-types</a></span> for an example.</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, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="dicts.html" title="backward to "4.15 Dictionaries"" data-pltdoc="x">← prev</a> <a href="data.html" title="up to "4 Datatypes"" data-pltdoc="x">up</a> <a href="procedures.html" title="forward to "4.17 Procedures"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|