This file is indexed.

/usr/share/doc/racket/reference/hashtables.html is in racket-doc 6.7-3.

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
<!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.13&nbsp;Hash Tables</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="icons.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9658;</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&nbsp;</td><td><a href="model.html" class="tocviewlink" data-pltdoc="x">Language Model</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="notation.html" class="tocviewlink" data-pltdoc="x">Notation for Documentation</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="syntax.html" class="tocviewlink" data-pltdoc="x">Syntactic Forms</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="data.html" class="tocviewselflink" data-pltdoc="x">Datatypes</a></td></tr><tr><td align="right">5&nbsp;</td><td><a href="structures.html" class="tocviewlink" data-pltdoc="x">Structures</a></td></tr><tr><td align="right">6&nbsp;</td><td><a href="mzlib_class.html" class="tocviewlink" data-pltdoc="x">Classes and Objects</a></td></tr><tr><td align="right">7&nbsp;</td><td><a href="mzlib_unit.html" class="tocviewlink" data-pltdoc="x">Units</a></td></tr><tr><td align="right">8&nbsp;</td><td><a href="contracts.html" class="tocviewlink" data-pltdoc="x">Contracts</a></td></tr><tr><td align="right">9&nbsp;</td><td><a href="match.html" class="tocviewlink" data-pltdoc="x">Pattern Matching</a></td></tr><tr><td align="right">10&nbsp;</td><td><a href="control.html" class="tocviewlink" data-pltdoc="x">Control Flow</a></td></tr><tr><td align="right">11&nbsp;</td><td><a href="concurrency.html" class="tocviewlink" data-pltdoc="x">Concurrency and Parallelism</a></td></tr><tr><td align="right">12&nbsp;</td><td><a href="Macros.html" class="tocviewlink" data-pltdoc="x">Macros</a></td></tr><tr><td align="right">13&nbsp;</td><td><a href="input-and-output.html" class="tocviewlink" data-pltdoc="x">Input and Output</a></td></tr><tr><td align="right">14&nbsp;</td><td><a href="security.html" class="tocviewlink" data-pltdoc="x">Reflection and Security</a></td></tr><tr><td align="right">15&nbsp;</td><td><a href="os.html" class="tocviewlink" data-pltdoc="x">Operating System</a></td></tr><tr><td align="right">16&nbsp;</td><td><a href="memory.html" class="tocviewlink" data-pltdoc="x">Memory Management</a></td></tr><tr><td align="right">17&nbsp;</td><td><a href="unsafe.html" class="tocviewlink" data-pltdoc="x">Unsafe Operations</a></td></tr><tr><td align="right">18&nbsp;</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,&quot;tocview_1&quot;);">&#9660;</a></td><td>4&nbsp;</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&nbsp;</td><td><a href="booleans.html" class="tocviewlink" data-pltdoc="x">Booleans and Equality</a></td></tr><tr><td align="right">4.2&nbsp;</td><td><a href="numbers.html" class="tocviewlink" data-pltdoc="x">Numbers</a></td></tr><tr><td align="right">4.3&nbsp;</td><td><a href="strings.html" class="tocviewlink" data-pltdoc="x">Strings</a></td></tr><tr><td align="right">4.4&nbsp;</td><td><a href="bytestrings.html" class="tocviewlink" data-pltdoc="x">Byte Strings</a></td></tr><tr><td align="right">4.5&nbsp;</td><td><a href="characters.html" class="tocviewlink" data-pltdoc="x">Characters</a></td></tr><tr><td align="right">4.6&nbsp;</td><td><a href="symbols.html" class="tocviewlink" data-pltdoc="x">Symbols</a></td></tr><tr><td align="right">4.7&nbsp;</td><td><a href="regexp.html" class="tocviewlink" data-pltdoc="x">Regular Expressions</a></td></tr><tr><td align="right">4.8&nbsp;</td><td><a href="keywords.html" class="tocviewlink" data-pltdoc="x">Keywords</a></td></tr><tr><td align="right">4.9&nbsp;</td><td><a href="pairs.html" class="tocviewlink" data-pltdoc="x">Pairs and Lists</a></td></tr><tr><td align="right">4.10&nbsp;</td><td><a href="mpairs.html" class="tocviewlink" data-pltdoc="x">Mutable Pairs and Lists</a></td></tr><tr><td align="right">4.11&nbsp;</td><td><a href="vectors.html" class="tocviewlink" data-pltdoc="x">Vectors</a></td></tr><tr><td align="right">4.12&nbsp;</td><td><a href="boxes.html" class="tocviewlink" data-pltdoc="x">Boxes</a></td></tr><tr><td align="right">4.13&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Hash Tables</a></td></tr><tr><td align="right">4.14&nbsp;</td><td><a href="sequences_streams.html" class="tocviewlink" data-pltdoc="x">Sequences and Streams</a></td></tr><tr><td align="right">4.15&nbsp;</td><td><a href="dicts.html" class="tocviewlink" data-pltdoc="x">Dictionaries</a></td></tr><tr><td align="right">4.16&nbsp;</td><td><a href="sets.html" class="tocviewlink" data-pltdoc="x">Sets</a></td></tr><tr><td align="right">4.17&nbsp;</td><td><a href="procedures.html" class="tocviewlink" data-pltdoc="x">Procedures</a></td></tr><tr><td align="right">4.18&nbsp;</td><td><a href="void.html" class="tocviewlink" data-pltdoc="x">Void</a></td></tr><tr><td align="right">4.19&nbsp;</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,&quot;tocview_2&quot;);">&#9658;</a></td><td>4.13&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Hash Tables</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">4.13.1&nbsp;</td><td><a href="#%28part._.Additional_.Hash_.Table_.Functions%29" class="tocviewlink" data-pltdoc="x">Additional Hash Table Functions</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-equal~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>equal?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-eqv~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>eqv?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-eq~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>eq?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-weak~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>weak?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hasheq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hasheq</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hasheqv%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hasheqv</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._make-hash%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>hash</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._make-hasheqv%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>hasheqv</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._make-hasheq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>hasheq</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._make-weak-hash%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>weak-<wbr></wbr>hash</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._make-weak-hasheqv%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>weak-<wbr></wbr>hasheqv</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._make-weak-hasheq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>weak-<wbr></wbr>hasheq</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._make-immutable-hash%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>immutable-<wbr></wbr>hash</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._make-immutable-hasheqv%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>immutable-<wbr></wbr>hasheqv</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._make-immutable-hasheq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>immutable-<wbr></wbr>hasheq</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-set%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>set!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._hash-set%2A%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>set*!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-set%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>set</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._hash-set%2A%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>set*</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-ref%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>ref</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._hash-ref%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>ref!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._hash-has-key~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>has-<wbr></wbr>key?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._hash-update%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>update!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._hash-update%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>update</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-remove%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>remove!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-remove%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>remove</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-clear%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>clear!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-clear%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>clear</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._hash-copy-clear%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>copy-<wbr></wbr>clear</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-map%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>map</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._hash-keys%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>keys</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._hash-values%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>values</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._hash-~3elist%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>&gt;list</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-keys-subset~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>keys-<wbr></wbr>subset?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-for-each%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>for-<wbr></wbr>each</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-count%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>count</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._hash-empty~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>empty?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-iterate-first%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>iterate-<wbr></wbr>first</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-iterate-next%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>iterate-<wbr></wbr>next</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-iterate-key%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>iterate-<wbr></wbr>key</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-iterate-value%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>iterate-<wbr></wbr>value</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-iterate-pair%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>iterate-<wbr></wbr>pair</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-iterate-key%2Bvalue%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>iterate-<wbr></wbr>key+<span class="mywbr"> &nbsp;</span>value</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._hash-copy%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>copy</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._eq-hash-code%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">eq-<wbr></wbr>hash-<wbr></wbr>code</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._eqv-hash-code%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">eqv-<wbr></wbr>hash-<wbr></wbr>code</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._equal-hash-code%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">equal-<wbr></wbr>hash-<wbr></wbr>code</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._equal-secondary-hash-code%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">equal-<wbr></wbr>secondary-<wbr></wbr>hash-<wbr></wbr>code</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.13.1<tt>&nbsp;</tt></span><a href="#%28part._.Additional_.Hash_.Table_.Functions%29" class="tocsubseclink" data-pltdoc="x">Additional Hash Table Functions</a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fhash..rkt%29._hash-union%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>union</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fhash..rkt%29._hash-union%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>union!</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, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="boxes.html" title="backward to &quot;4.12 Boxes&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="data.html" title="up to &quot;4 Datatypes&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="sequences_streams.html" title="forward to &quot;4.14 Sequences and Streams&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h4 x-source-module="(lib &quot;scribblings/reference/reference.scrbl&quot;)" x-source-pkg="racket-doc" x-part-tag="&quot;hashtables&quot;">4.13<tt>&nbsp;</tt><a name="(part._hashtables)"></a>Hash Tables</h4><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p><span class="imageleft"><img src="finger.png" alt="+" width="24" height="24"/></span><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&amp;rel=hash-tables.html&amp;version=6.7" class="Sq" data-pltdoc="x">Hash Tables</a> in <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&amp;rel=index.html&amp;version=6.7" class="Sq" data-pltdoc="x"><span style="font-weight: bold">The Racket Guide</span></a> introduces hash tables.</p></blockquote></blockquote></blockquote><p>A <a name="(tech._hash._table)"></a><span style="font-style: italic">hash table</span> (or simply <a name="(tech._hash)"></a><span style="font-style: italic">hash</span>) maps each of its
keys to a single value. For a given hash table, keys are equivalent
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 keys are
retained either strongly or weakly (see <a href="weakbox.html" data-pltdoc="x">Weak Boxes</a>). A hash
table is also either mutable or immutable. Immutable hash tables
support effectively constant-time access and update, just like mutable
hash tables; the constant on immutable operations is usually larger,
but the functional nature of immutable hash tables can pay off in
certain algorithms.</p><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>Immutable hash tables actually provide <span style="font-style: italic">O</span>(<span style="font-style: italic">log N</span>)<span style="font-style: italic"></span>
access and update. Since <span style="font-style: italic">N</span> is limited by the address space so
that <span style="font-style: italic">log N</span> is limited to less than 30 or 62 (depending on the
platform), <span style="font-style: italic">log N</span> can be treated reasonably as a constant.</p></blockquote></blockquote></blockquote><p>For <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>-based hashing, the built-in hash functions on
<a href="strings.html#%28tech._string%29" class="techoutside" data-pltdoc="x"><span class="techinside">strings</span></a>, <a href="pairs.html#%28tech._pair%29" class="techoutside" data-pltdoc="x"><span class="techinside">pairs</span></a>, <a href="pairs.html#%28tech._list%29" class="techoutside" data-pltdoc="x"><span class="techinside">lists</span></a>, <a href="vectors.html#%28tech._vector%29" class="techoutside" data-pltdoc="x"><span class="techinside">vectors</span></a>,
<a href="structures.html#%28tech._prefab%29" class="techoutside" data-pltdoc="x"><span class="techinside">prefab</span></a> or transparent <a href="structures.html#%28tech._structure%29" class="techoutside" data-pltdoc="x"><span class="techinside">structures</span></a>, etc<span class="Sendabbrev">.</span>, take time
proportional to the size of the value. The hash code for a compound
data structure, such as a list or vector, depends on hashing each item
of the container, but the depth of such recursive hashing is
limited (to avoid potential problems with cyclic data). For a
non-<a href="pairs.html#%28tech._list%29" class="techoutside" data-pltdoc="x"><span class="techinside">list</span></a> <a href="pairs.html#%28tech._pair%29" class="techoutside" data-pltdoc="x"><span class="techinside">pair</span></a>, both <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> and <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span>
hashing is treated as a deeper hash, but the <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> of a
<a href="pairs.html#%28tech._list%29" class="techoutside" data-pltdoc="x"><span class="techinside">list</span></a> is treated as having the same hashing depth as the list.</p><p>A hash table can be used as a two-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 keys and values of the hash table serve as
elements of the sequence (i.e., each element is a key and its
associated value). If a mapping is added to or removed from the hash
table 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
keys and values.  See also <span class="RktSym"><a href="sequences.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._in-hash%29%29" class="RktValLink" data-pltdoc="x">in-hash</a></span>, <span class="RktSym"><a href="sequences.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._in-hash-keys%29%29" class="RktValLink" data-pltdoc="x">in-hash-keys</a></span>,
<span class="RktSym"><a href="sequences.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._in-hash-values%29%29" class="RktValLink" data-pltdoc="x">in-hash-values</a></span>, and <span class="RktSym"><a href="sequences.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._in-hash-pairs%29%29" class="RktValLink" data-pltdoc="x">in-hash-pairs</a></span>.</p><p>Two hash tables cannot be <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> unless they use the same
key-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 keys strongly or weakly, and have the same
mutability.</p><p><a name="(elem._(caveat._concurrency))"></a><span style="font-weight: bold">Caveats concerning concurrent
modification:</span> A mutable hash table can be manipulated with
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-ref%29%29" class="RktValLink" data-pltdoc="x">hash-ref</a></span>, <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-set%21%29%29" class="RktValLink" data-pltdoc="x">hash-set!</a></span>, and <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-remove%21%29%29" class="RktValLink" data-pltdoc="x">hash-remove!</a></span>
concurrently by multiple threads, and the operations are protected by
a table-specific semaphore as needed. Three caveats apply, however:</p><ul><li><p>If a thread is terminated while applying <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-ref%29%29" class="RktValLink" data-pltdoc="x">hash-ref</a></span>,
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-set%21%29%29" class="RktValLink" data-pltdoc="x">hash-set!</a></span>, <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-remove%21%29%29" class="RktValLink" data-pltdoc="x">hash-remove!</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._hash-ref%21%29%29" class="RktValLink" data-pltdoc="x">hash-ref!</a></span>,
or <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._hash-update%21%29%29" class="RktValLink" data-pltdoc="x">hash-update!</a></span> to a hash table that
uses <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> key comparisons, all current
and future operations on the hash table may block indefinitely.</p></li><li><p>The <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-map%29%29" class="RktValLink" data-pltdoc="x">hash-map</a></span>, <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-for-each%29%29" class="RktValLink" data-pltdoc="x">hash-for-each</a></span>, and <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-clear%21%29%29" class="RktValLink" data-pltdoc="x">hash-clear!</a></span> procedures do
not use the table&rsquo;s semaphore to guard the traversal as a whole.
Changes by one thread to a hash table can affect the keys and values
seen by another thread part-way through its traversal of the same
hash table.</p></li><li><p>The <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._hash-update%21%29%29" class="RktValLink" data-pltdoc="x">hash-update!</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._hash-ref%21%29%29" class="RktValLink" data-pltdoc="x">hash-ref!</a></span> functions
use a table&rsquo;s semaphore
independently for the <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-ref%29%29" class="RktValLink" data-pltdoc="x">hash-ref</a></span> and <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-set%21%29%29" class="RktValLink" data-pltdoc="x">hash-set!</a></span> parts
of their functionality, which means that the update as a whole is not
&ldquo;atomic.&rdquo;</p></li></ul><p><a name="(elem._(caveat._mutable-keys))"></a><span style="font-weight: bold">Caveat concerning mutable
keys:</span> If a key in an <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>-based hash table is mutated
(e.g., a key string is modified with <span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string-set%21%29%29" class="RktValLink" data-pltdoc="x">string-set!</a></span>), then the
hash table&rsquo;s behavior for insertion and lookup operations becomes
unpredictable.</p><p>A literal or printed hash table starts with <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#hash</span><span class="hspace"></span></span>,
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">#hasheqv</span><span class="hspace"></span></span>, or
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">#hasheq</span><span class="hspace"></span></span>. See <a href="reader.html#%28part._parse-hashtable%29" data-pltdoc="x">Reading Hash Tables</a>
    for information on <span class="RktSym"><a href="Reading.html#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span>ing
    hash tables and <a href="printing.html#%28part._print-hashtable%29" data-pltdoc="x">Printing Hash Tables</a>
    for information on <span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._print%29%29" class="RktValLink" data-pltdoc="x">print</a></span>ing hash tables.</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._((quote._~23~25kernel)._hash~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="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">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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._hash._table%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash table</span></a>, <span class="RktVal">#f</span>
otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._hash-equal~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-equal~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-equal?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">hash</span> compares keys 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="RktVal">#f</span> if it compares with <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> 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>.</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._((quote._~23~25kernel)._hash-eqv~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-eqv~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-eqv?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">hash</span> compares keys with <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>,
<span class="RktVal">#f</span> if it compares 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> 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>.</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._((quote._~23~25kernel)._hash-eq~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-eq~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-eq?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">hash</span> compares keys with <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>,
<span class="RktVal">#f</span> if it compares 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> 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>.</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._((quote._~23~25kernel)._hash-weak~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-weak~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-weak?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">hash</span> retains its keys weakly,
<span class="RktVal">#f</span> if it retains keys strongly.</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._((quote._~23~25kernel)._hash))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span><span class="RktVar">val</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-equal~3f%29%29" class="RktValLink" data-pltdoc="x">hash-equal?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">val</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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._((quote._~23~25kernel)._hasheq))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hasheq%29%29" class="RktValDef RktValLink" data-pltdoc="x">hasheq</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span><span class="RktVar">val</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-eq~3f%29%29" class="RktValLink" data-pltdoc="x">hash-eq?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">val</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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._((quote._~23~25kernel)._hasheqv))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hasheqv%29%29" class="RktValDef RktValLink" data-pltdoc="x">hasheqv</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span><span class="RktVar">val</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-eqv~3f%29%29" class="RktValLink" data-pltdoc="x">hash-eqv?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">val</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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 an immutable hash table with each given <span class="RktVar">key</span> mapped to
the following <span class="RktVar">val</span>; each <span class="RktVar">key</span> must have a <span class="RktVar">val</span>,
so the total number of arguments to <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash%29%29" class="RktValLink" data-pltdoc="x">hash</a></span> must be even.</div></p><p>The <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash%29%29" class="RktValLink" data-pltdoc="x">hash</a></span> procedure creates a table where keys are compared
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="#%28def._%28%28quote._~23~25kernel%29._hasheq%29%29" class="RktValLink" data-pltdoc="x">hasheq</a></span> procedure creates a table where
keys are compared with <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 <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hasheqv%29%29" class="RktValLink" data-pltdoc="x">hasheqv</a></span> procedure
creates a table where keys are compared with <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>.</p><p>The <span class="RktVar">key</span> to <span class="RktVar">val</span> mappings are added to the table in
the order that they appear in the argument list, so later mappings can
hide earlier mappings if the <span class="RktVar">key</span>s are equal.</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._((quote._~23~25kernel)._make-hash))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-hash%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-hash</a></span></span><span class="hspace">&nbsp;</span>[<span class="RktVar">assocs</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-equal~3f%29%29" class="RktValLink" data-pltdoc="x">hash-equal?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">assocs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._pair~3f%29%29" class="RktValLink" data-pltdoc="x">pair?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._null%29%29" class="RktValLink" data-pltdoc="x">null</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._((quote._~23~25kernel)._make-hasheqv))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-hasheqv%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-hasheqv</a></span></span><span class="hspace">&nbsp;</span>[<span class="RktVar">assocs</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-eqv~3f%29%29" class="RktValLink" data-pltdoc="x">hash-eqv?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">assocs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._pair~3f%29%29" class="RktValLink" data-pltdoc="x">pair?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._null%29%29" class="RktValLink" data-pltdoc="x">null</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._((quote._~23~25kernel)._make-hasheq))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-hasheq%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-hasheq</a></span></span><span class="hspace">&nbsp;</span>[<span class="RktVar">assocs</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-eq~3f%29%29" class="RktValLink" data-pltdoc="x">hash-eq?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">assocs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._pair~3f%29%29" class="RktValLink" data-pltdoc="x">pair?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._null%29%29" class="RktValLink" data-pltdoc="x">null</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Creates a mutable hash table that holds keys strongly.</div></p><p>The <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-hash%29%29" class="RktValLink" data-pltdoc="x">make-hash</a></span> procedure creates a table where keys are
compared 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="#%28def._%28%28quote._~23~25kernel%29._make-hasheq%29%29" class="RktValLink" data-pltdoc="x">make-hasheq</a></span> procedure creates
a table where keys are compared with <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
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-hasheqv%29%29" class="RktValLink" data-pltdoc="x">make-hasheqv</a></span> procedure creates a table where keys are
compared with <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>.</p><p>The table is initialized with the content of <span class="RktVar">assocs</span>.  In each
element of <span class="RktVar">assocs</span>, the <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is a key, and the
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is the corresponding value. The mappings are added to the
table in the order that they appear in <span class="RktVar">assocs</span>, so later
mappings can hide earlier mappings.</p><p>See also <span class="RktSym"><a href="dicts.html#%28def._%28%28lib._racket%2Fdict..rkt%29._make-custom-hash%29%29" class="RktValLink" data-pltdoc="x">make-custom-hash</a></span>.</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._((quote._~23~25kernel)._make-weak-hash))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-weak-hash%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-weak-hash</a></span></span><span class="hspace">&nbsp;</span>[<span class="RktVar">assocs</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-equal~3f%29%29" class="RktValLink" data-pltdoc="x">hash-equal?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-weak~3f%29%29" class="RktValLink" data-pltdoc="x">hash-weak?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">assocs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._pair~3f%29%29" class="RktValLink" data-pltdoc="x">pair?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._null%29%29" class="RktValLink" data-pltdoc="x">null</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._((quote._~23~25kernel)._make-weak-hasheqv))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-weak-hasheqv%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-weak-hasheqv</a></span></span><span class="hspace">&nbsp;</span>[<span class="RktVar">assocs</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-eqv~3f%29%29" class="RktValLink" data-pltdoc="x">hash-eqv?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-weak~3f%29%29" class="RktValLink" data-pltdoc="x">hash-weak?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">assocs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._pair~3f%29%29" class="RktValLink" data-pltdoc="x">pair?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._null%29%29" class="RktValLink" data-pltdoc="x">null</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._((quote._~23~25kernel)._make-weak-hasheq))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-weak-hasheq%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-weak-hasheq</a></span></span><span class="hspace">&nbsp;</span>[<span class="RktVar">assocs</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-eq~3f%29%29" class="RktValLink" data-pltdoc="x">hash-eq?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-weak~3f%29%29" class="RktValLink" data-pltdoc="x">hash-weak?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">assocs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._pair~3f%29%29" class="RktValLink" data-pltdoc="x">pair?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._null%29%29" class="RktValLink" data-pltdoc="x">null</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-hash%29%29" class="RktValLink" data-pltdoc="x">make-hash</a></span>, <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-hasheq%29%29" class="RktValLink" data-pltdoc="x">make-hasheq</a></span>, and
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-hasheqv%29%29" class="RktValLink" data-pltdoc="x">make-hasheqv</a></span>, but creates a mutable hash table that holds
keys weakly.</div></p><p>Beware that values in the table are retained normally. If a value in
the table refers back to its key, then the table will retain the value
and therefore the key; the mapping will never be removed from the
table even if the key becomes otherwise inaccessible. To avoid that
problem, instead of mapping the key to the value, map the key to an
<a href="ephemerons.html#%28tech._ephemeron%29" class="techoutside" data-pltdoc="x"><span class="techinside">ephemeron</span></a> that pairs the key and value.</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._((quote._~23~25kernel)._make-immutable-hash))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-immutable-hash%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-immutable-hash</a></span></span><span class="hspace">&nbsp;</span>[<span class="RktVar">assocs</span>]<span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-equal~3f%29%29" class="RktValLink" data-pltdoc="x">hash-equal?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">assocs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._pair~3f%29%29" class="RktValLink" data-pltdoc="x">pair?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._null%29%29" class="RktValLink" data-pltdoc="x">null</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._((quote._~23~25kernel)._make-immutable-hasheqv))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-immutable-hasheqv%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-immutable-hasheqv</a></span></span><span class="hspace">&nbsp;</span>[<span class="RktVar">assocs</span>]<span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-eqv~3f%29%29" class="RktValLink" data-pltdoc="x">hash-eqv?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">assocs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._pair~3f%29%29" class="RktValLink" data-pltdoc="x">pair?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._null%29%29" class="RktValLink" data-pltdoc="x">null</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._((quote._~23~25kernel)._make-immutable-hasheq))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-immutable-hasheq%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-immutable-hasheq</a></span></span><span class="hspace">&nbsp;</span>[<span class="RktVar">assocs</span>]<span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-eq~3f%29%29" class="RktValLink" data-pltdoc="x">hash-eq?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">assocs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._pair~3f%29%29" class="RktValLink" data-pltdoc="x">pair?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._null%29%29" class="RktValLink" data-pltdoc="x">null</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash%29%29" class="RktValLink" data-pltdoc="x">hash</a></span>, <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hasheq%29%29" class="RktValLink" data-pltdoc="x">hasheq</a></span>, and <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hasheqv%29%29" class="RktValLink" data-pltdoc="x">hasheqv</a></span>, but accepts
the key&ndash;value mapping in association-list form like
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-hash%29%29" class="RktValLink" data-pltdoc="x">make-hash</a></span>, <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-hasheq%29%29" class="RktValLink" data-pltdoc="x">make-hasheq</a></span>, and <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-hasheqv%29%29" class="RktValLink" data-pltdoc="x">make-hasheqv</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._hash-set!))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-set%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-set!</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="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">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</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">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="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">Maps <span class="RktVar">key</span> to <span class="RktVar">v</span> in <span class="RktVar">hash</span>, overwriting
any existing mapping for <span class="RktVar">key</span>.</div></p><p>See also the <a href="#%28elem._%28caveat._concurrency%29%29" data-pltdoc="x">caveats concerning concurrent modification</a> and the <a href="#%28elem._%28caveat._mutable-keys%29%29" data-pltdoc="x">caveat concerning mutable keys</a> above.</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/private/base..rkt)._hash-set*!))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._hash-set%2A%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-set*!</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</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">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="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">Maps each <span class="RktVar">key</span> to each <span class="RktVar">v</span> in <span class="RktVar">hash</span>, overwriting
any existing mapping for each <span class="RktVar">key</span>. Mappings are added from the left, so
later mappings overwrite earlier mappings.</div></p><p>See also the <a href="#%28elem._%28caveat._concurrency%29%29" data-pltdoc="x">caveats concerning concurrent modification</a> and the <a href="#%28elem._%28caveat._mutable-keys%29%29" data-pltdoc="x">caveat concerning mutable keys</a> above.</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._((quote._~23~25kernel)._hash-set))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-set%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-set</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="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">Functionally extends <span class="RktVar">hash</span> by mapping <span class="RktVar">key</span> to
<span class="RktVar">v</span>, overwriting any existing mapping for <span class="RktVar">key</span>, and
returning the extended hash table.</div></p><p>See also the <a href="#%28elem._%28caveat._mutable-keys%29%29" data-pltdoc="x">caveat concerning mutable keys</a> above.</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/private/base..rkt)._hash-set*))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._hash-set%2A%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-set*</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="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">Functionally extends <span class="RktVar">hash</span> by mapping each <span class="RktVar">key</span> to
<span class="RktVar">v</span>, overwriting any existing mapping for each <span class="RktVar">key</span>, and
returning the extended hash table. Mappings are added from the left, so
later mappings overwrite earlier mappings.</div></p><p>See also the <a href="#%28elem._%28caveat._mutable-keys%29%29" data-pltdoc="x">caveat concerning mutable keys</a> above.</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._((quote._~23~25kernel)._hash-ref))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-ref%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-ref</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span>[<span class="RktVar">failure-result</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">failure-result</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="contract-utilities.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._failure-result%2Fc%29%29" class="RktValLink" data-pltdoc="x">failure-result/c</a></span><span class="hspace">&nbsp;</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 valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="exns.html#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:contract</a></span><span class="hspace">&nbsp;</span><span class="RktSym">....</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Returns the value for <span class="RktVar">key</span> in <span class="RktVar">hash</span>. If no value
is found for <span class="RktVar">key</span>, then <span class="RktVar">failure-result</span> determines the
result:</div></p><ul><li><p>If <span class="RktVar">failure-result</span> is a procedure, it is called
(through a tail call) with no arguments to produce the result.</p></li><li><p>Otherwise, <span class="RktVar">failure-result</span> is returned as the result.</p></li></ul><p>See also the <a href="#%28elem._%28caveat._concurrency%29%29" data-pltdoc="x">caveats concerning concurrent modification</a> and the <a href="#%28elem._%28caveat._mutable-keys%29%29" data-pltdoc="x">caveat concerning mutable keys</a> above.</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/private/more-scheme..rkt)._hash-ref!))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._hash-ref%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-ref!</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span><span class="RktVar">to-set</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">to-set</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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 the value for <span class="RktVar">key</span> in <span class="RktVar">hash</span>.  If no value is
found for <span class="RktVar">key</span>, then <span class="RktVar">to-set</span> determines the result as
in <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-ref%29%29" class="RktValLink" data-pltdoc="x">hash-ref</a></span> (i.e., it is either a thunk that computes a value
or a plain value), and this result is stored in <span class="RktVar">hash</span> for the
<span class="RktVar">key</span>.  (Note that if <span class="RktVar">to-set</span> is a thunk, it is not
invoked in tail position.)</div></p><p>See also the <a href="#%28elem._%28caveat._concurrency%29%29" data-pltdoc="x">caveats concerning concurrent modification</a> and the <a href="#%28elem._%28caveat._mutable-keys%29%29" data-pltdoc="x">caveat concerning mutable keys</a> above.</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/private/more-scheme..rkt)._hash-has-key~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._hash-has-key~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-has-key?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span><span class="RktVar">key</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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">hash</span> contains a value for the given
<span class="RktVar">key</span>, <span class="RktVal">#f</span> otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/private/more-scheme..rkt)._hash-update!))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._hash-update%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-update!</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">hash</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">key</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">updater</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">failure-result</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><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></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</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">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">updater</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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">&nbsp;</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">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</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><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">failure-result</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="contract-utilities.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._failure-result%2Fc%29%29" class="RktValLink" data-pltdoc="x">failure-result/c</a></span><span class="hspace">&nbsp;</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 valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="exns.html#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:contract</a></span><span class="hspace">&nbsp;</span><span class="RktSym">....</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Composes <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-ref%29%29" class="RktValLink" data-pltdoc="x">hash-ref</a></span> and <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-set%21%29%29" class="RktValLink" data-pltdoc="x">hash-set!</a></span> to update an
existing mapping in <span class="RktVar">hash</span>, where the optional
<span class="RktVar">failure-result</span> argument is used as in <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-ref%29%29" class="RktValLink" data-pltdoc="x">hash-ref</a></span> when
no mapping exists for <span class="RktVar">key</span> already. See the caveat above about
concurrent updates.</div></p><p>See also the <a href="#%28elem._%28caveat._concurrency%29%29" data-pltdoc="x">caveats concerning concurrent modification</a> and the <a href="#%28elem._%28caveat._mutable-keys%29%29" data-pltdoc="x">caveat concerning mutable keys</a> above.</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/private/more-scheme..rkt)._hash-update))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._hash-update%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-update</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span><span class="RktVar">updater</span><span class="hspace">&nbsp;</span>[<span class="RktVar">failure-result</span>]<span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">updater</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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">&nbsp;</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">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</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><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">failure-result</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="contract-utilities.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._failure-result%2Fc%29%29" class="RktValLink" data-pltdoc="x">failure-result/c</a></span><span class="hspace">&nbsp;</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 valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="exns.html#%28def._%28%28quote._~23~25kernel%29._raise%29%29" class="RktValLink" data-pltdoc="x">raise</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._make-exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">make-exn:fail:contract</a></span><span class="hspace">&nbsp;</span><span class="RktSym">....</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Composes <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-ref%29%29" class="RktValLink" data-pltdoc="x">hash-ref</a></span> and <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-set%29%29" class="RktValLink" data-pltdoc="x">hash-set</a></span> to functionally
update an existing mapping in <span class="RktVar">hash</span>, where the optional
<span class="RktVar">failure-result</span> argument is used as in <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-ref%29%29" class="RktValLink" data-pltdoc="x">hash-ref</a></span> when
no mapping exists for <span class="RktVar">key</span> already.</div></p><p>See also the <a href="#%28elem._%28caveat._mutable-keys%29%29" data-pltdoc="x">caveat concerning mutable keys</a> above.</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._((quote._~23~25kernel)._hash-remove!))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-remove%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-remove!</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span><span class="RktVar">key</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</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">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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">Removes any existing mapping for <span class="RktVar">key</span> in <span class="RktVar">hash</span>.</div></p><p>See also the <a href="#%28elem._%28caveat._concurrency%29%29" data-pltdoc="x">caveats concerning concurrent modification</a> and the <a href="#%28elem._%28caveat._mutable-keys%29%29" data-pltdoc="x">caveat concerning mutable keys</a> above.</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._((quote._~23~25kernel)._hash-remove))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-remove%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-remove</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span><span class="RktVar">key</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">key</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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">Functionally removes any existing mapping for <span class="RktVar">key</span> in
<span class="RktVar">hash</span>, returning the fresh hash table.</div></p><p>See also the <a href="#%28elem._%28caveat._mutable-keys%29%29" data-pltdoc="x">caveat concerning mutable keys</a> above.</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._((quote._~23~25kernel)._hash-clear!))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-clear%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-clear!</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</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">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Removes all mappings from <span class="RktVar">hash</span>.</div></p><p>If <span class="RktVar">hash</span> is not an <a href="chaperones.html#%28tech._impersonator%29" class="techoutside" data-pltdoc="x"><span class="techinside">impersonator</span></a>, then all mappings are
removed in constant time. If <span class="RktVar">hash</span> is an <a href="chaperones.html#%28tech._impersonator%29" class="techoutside" data-pltdoc="x"><span class="techinside">impersonator</span></a>,
then each key is removed one-by-one using <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-remove%21%29%29" class="RktValLink" data-pltdoc="x">hash-remove!</a></span>.</p><p>See also the <a href="#%28elem._%28caveat._concurrency%29%29" data-pltdoc="x">caveats concerning concurrent modification</a> and the <a href="#%28elem._%28caveat._mutable-keys%29%29" data-pltdoc="x">caveat concerning mutable keys</a> above.</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._((quote._~23~25kernel)._hash-clear))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-clear%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-clear</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Functionally removes all mappings from <span class="RktVar">hash</span>.</div></p><p>If <span class="RktVar">hash</span> is not a <a href="chaperones.html#%28tech._chaperone%29" class="techoutside" data-pltdoc="x"><span class="techinside">chaperone</span></a>, then clearing is
equivalent to creating a new <a href="#%28tech._hash._table%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash table</span></a>, and the operation is
performed in constant time.  If <span class="RktVar">hash</span> is a <a href="chaperones.html#%28tech._chaperone%29" class="techoutside" data-pltdoc="x"><span class="techinside">chaperone</span></a>,
then each key is removed one-by-one using <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-remove%29%29" class="RktValLink" data-pltdoc="x">hash-remove</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/private/base..rkt)._hash-copy-clear))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._hash-copy-clear%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-copy-clear</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Produces an empty <a href="#%28tech._hash._table%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash table</span></a> with the same key-comparison
procedure and mutability of <span class="RktVar">hash</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._hash-map))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-map%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-map</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span><span class="RktVar">proc</span><span class="hspace">&nbsp;</span>[<span class="RktVar">try-order?</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</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">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">proc</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="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">&nbsp;</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">&nbsp;</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">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</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">&nbsp;&nbsp;</span><span class="RktVar">try-order?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Applies the procedure <span class="RktVar">proc</span> to each element in
<span class="RktVar">hash</span> in an unspecified order, accumulating the results
into a list. The procedure <span class="RktVar">proc</span> is called each time with a
key and its value, and the procedure&rsquo;s individual results appear in
order in the result list.</div></p><p>If a hash table is extended with new keys (either through
<span class="RktVar">proc</span> or by another thread) while a <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-map%29%29" class="RktValLink" data-pltdoc="x">hash-map</a></span> or
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-for-each%29%29" class="RktValLink" data-pltdoc="x">hash-for-each</a></span> traversal is in process, arbitrary key&ndash;value
pairs can be dropped or duplicated in the traversal. Key mappings can
be deleted or remapped (by any thread) with no adverse affects; the
change does not affect a traversal if the key has been seen already,
otherwise the traversal skips a deleted key or uses the remapped key&rsquo;s
new value.</p><p>If <span class="RktVar">try-order?</span> is true, then the order of keys and values
passed to <span class="RktVar">proc</span> is normalized under certain circumstances,
such as when the keys are all symbols and <span class="RktVar">hash</span> is not an
<a href="chaperones.html#%28tech._impersonator%29" class="techoutside" data-pltdoc="x"><span class="techinside">impersonator</span></a>.</p><p>See also the <a href="#%28elem._%28caveat._concurrency%29%29" data-pltdoc="x">caveats concerning concurrent modification</a> above.</p><p class="SHistory">Changed in version 6.3 of package <span class="stt">base</span>: Added the <span class="RktVar">try-order?</span> argument.</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/private/base..rkt)._hash-keys))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._hash-keys%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-keys</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</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">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a list of the keys of <span class="RktVar">hash</span> in an unspecified order.</div></p><p><div class="SIntrapara">See <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-map%29%29" class="RktValLink" data-pltdoc="x">hash-map</a></span> for information about modifying <span class="RktVar">hash</span>
during <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._hash-keys%29%29" class="RktValLink" data-pltdoc="x">hash-keys</a></span>. </div><div class="SIntrapara">See also the <a href="#%28elem._%28caveat._concurrency%29%29" data-pltdoc="x">caveats concerning concurrent modification</a> above.</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/private/base..rkt)._hash-values))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._hash-values%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-values</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</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">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a list of the values of <span class="RktVar">hash</span> in an unspecified order.</div></p><p><div class="SIntrapara">See <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-map%29%29" class="RktValLink" data-pltdoc="x">hash-map</a></span> for information about modifying <span class="RktVar">hash</span>
during <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._hash-values%29%29" class="RktValLink" data-pltdoc="x">hash-values</a></span>. </div><div class="SIntrapara">See also the <a href="#%28elem._%28caveat._concurrency%29%29" data-pltdoc="x">caveats concerning concurrent modification</a> above.</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/private/base..rkt)._hash-~3elist))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._hash-~3elist%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-&gt;list</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._cons%2Fc%29%29" class="RktValLink" data-pltdoc="x">cons/c</a></span><span class="hspace">&nbsp;</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">&nbsp;</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></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a list of the key&ndash;value pairs of <span class="RktVar">hash</span> in an unspecified order.</div></p><p><div class="SIntrapara">See <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-map%29%29" class="RktValLink" data-pltdoc="x">hash-map</a></span> for information about modifying <span class="RktVar">hash</span>
during <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._hash-~3elist%29%29" class="RktValLink" data-pltdoc="x">hash-&gt;list</a></span>. </div><div class="SIntrapara">See also the <a href="#%28elem._%28caveat._concurrency%29%29" data-pltdoc="x">caveats concerning concurrent modification</a> above.</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._((quote._~23~25kernel)._hash-keys-subset~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-keys-subset~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-keys-subset?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash1</span><span class="hspace">&nbsp;</span><span class="RktVar">hash2</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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">&nbsp;&nbsp;</span><span class="RktVar">hash1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if the keys of <span class="RktVar">hash1</span> are a subset of or
the same as the keys of <span class="RktVar">hash2</span>. The hash tables must both use
the same key-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>), otherwise the <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> exception is raised.</div></p><p>Using <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-keys-subset~3f%29%29" class="RktValLink" data-pltdoc="x">hash-keys-subset?</a></span> on immutable hash tables can be much
faster than iterating through the keys of <span class="RktVar">hash1</span> to make sure
that each is in <span class="RktVar">hash2</span>.</p><p class="SHistory">Added in version 6.5.0.8 of package <span class="stt">base</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._((quote._~23~25kernel)._hash-for-each))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-for-each%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-for-each</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span><span class="RktVar">proc</span><span class="hspace">&nbsp;</span>[<span class="RktVar">try-order?</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">proc</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="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">&nbsp;</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">&nbsp;</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">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</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><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">try-order?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Applies <span class="RktVar">proc</span> to each element in <span class="RktVar">hash</span> (for the
side-effects of <span class="RktVar">proc</span>) in an unspecified order. The procedure
<span class="RktVar">proc</span> is called each time with a key and its value.</div></p><p><div class="SIntrapara">See <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-map%29%29" class="RktValLink" data-pltdoc="x">hash-map</a></span> for information about <span class="RktVar">try-order?</span> and
about modifying <span class="RktVar">hash</span> within <span class="RktVar">proc</span>.
</div><div class="SIntrapara">See also the <a href="#%28elem._%28caveat._concurrency%29%29" data-pltdoc="x">caveats concerning concurrent modification</a> above.</div></p><p class="SHistory">Changed in version 6.3 of package <span class="stt">base</span>: Added the <span class="RktVar">try-order?</span> argument.</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._((quote._~23~25kernel)._hash-count))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-count%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-count</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the number of keys mapped by <span class="RktVar">hash</span>. Unless <span class="RktVar">hash</span>
retains keys weakly, the result is computed in
constant time and atomically. If <span class="RktVar">hash</span> retains it keys weakly, a
traversal is required to count the keys.</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/private/base..rkt)._hash-empty~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._hash-empty~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-empty?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Equivalent to <span class="RktPn">(</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._zero~3f%29%29" class="RktValLink" data-pltdoc="x">zero?</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-count%29%29" class="RktValLink" data-pltdoc="x">hash-count</a></span><span class="stt"> </span><span class="RktVar">hash</span><span class="RktPn">)</span><span class="RktPn">)</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._hash-iterate-first))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-iterate-first%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-iterate-first</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</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><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#f</span> if <span class="RktVar">hash</span> contains no elements, otherwise
it returns an integer that is an index to the first element in the hash
table; &ldquo;first&rdquo; refers to an unspecified ordering of the table
elements, and the index values are not necessarily consecutive
integers. For a mutable <span class="RktVar">hash</span>, this index is guaranteed to
refer to the first item only as long as no items are added to or
removed from <span class="RktVar">hash</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._hash-iterate-next))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-iterate-next%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-iterate-next</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span><span class="RktVar">pos</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</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><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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></td></tr></table></blockquote></div><div class="SIntrapara">Returns either an integer that is an index to the element in
<span class="RktVar">hash</span> after the element indexed by <span class="RktVar">pos</span> (which is not
necessarily one more than <span class="RktVar">pos</span>) or <span class="RktVal">#f</span> if <span class="RktVar">pos</span>
refers to the last element in <span class="RktVar">hash</span>. If <span class="RktVar">pos</span> is not a
valid index, then the <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> exception is raised. For a mutable
<span class="RktVar">hash</span>, the result index is guaranteed to refer to its item
only as long as no items are added to or removed from <span class="RktVar">hash</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._hash-iterate-key))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-iterate-key%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-iterate-key</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span><span class="RktVar">pos</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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></td></tr></table></blockquote></div><div class="SIntrapara">Returns the key for the element in <span class="RktVar">hash</span> at index
<span class="RktVar">pos</span>. If <span class="RktVar">pos</span> is not a valid index for
<span class="RktVar">hash</span>, the <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> exception is raised.</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._((quote._~23~25kernel)._hash-iterate-value))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-iterate-value%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-iterate-value</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span><span class="RktVar">pos</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</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></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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></td></tr></table></blockquote></div><div class="SIntrapara">Returns the value for the element in <span class="RktVar">hash</span> at index
<span class="RktVar">pos</span>. If <span class="RktVar">pos</span> is not a valid index for
<span class="RktVar">hash</span>, the <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> exception is raised.</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._((quote._~23~25kernel)._hash-iterate-pair))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-iterate-pair%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-iterate-pair</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span><span class="RktVar">pos</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cons%29%29" class="RktValLink" data-pltdoc="x">cons</a></span><span class="hspace">&nbsp;</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="hspace">&nbsp;</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></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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></td></tr></table></blockquote></div><div class="SIntrapara">Returns a pair containing the key and value for the element
in <span class="RktVar">hash</span> at index
<span class="RktVar">pos</span>. If <span class="RktVar">pos</span> is not a valid index for
<span class="RktVar">hash</span>, the <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> exception is raised.</div></p><p class="SHistory">Added in version 6.4.0.5 of package <span class="stt">base</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><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._hash-iterate-key+value))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-iterate-key%2Bvalue%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-iterate-key+value</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span><span class="RktVar">pos</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0"><tr><td><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></td><td><span class="hspace">&nbsp;</span></td><td><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></td></tr></table></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</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></td></tr></table></blockquote></div><div class="SIntrapara">Returns the key and value for the element in <span class="RktVar">hash</span> at index
<span class="RktVar">pos</span>. If <span class="RktVar">pos</span> is not a valid index for
<span class="RktVar">hash</span>, the <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> exception is raised.</div></p><p class="SHistory">Added in version 6.4.0.5 of package <span class="stt">base</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._((quote._~23~25kernel)._hash-copy))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash-copy%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-copy</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">hash</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</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">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hash</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a mutable hash table with the same mappings, same
key-comparison mode, and same key-holding strength as <span class="RktVar">hash</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._eq-hash-code))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._eq-hash-code%29%29" class="RktValDef RktValLink" data-pltdoc="x">eq-hash-code</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._fixnum~3f%29%29" class="RktValLink" data-pltdoc="x">fixnum?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="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 a <a href="numbers.html#%28tech._fixnum%29" class="techoutside" data-pltdoc="x"><span class="techinside">fixnum</span></a>; for any two calls with <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> values,
the returned number is the same.</div></p><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>Equal <a href="numbers.html#%28tech._fixnum%29" class="techoutside" data-pltdoc="x"><span class="techinside">fixnums</span></a> are always <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>.</p></blockquote></blockquote></blockquote><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._((quote._~23~25kernel)._eqv-hash-code))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._eqv-hash-code%29%29" class="RktValDef RktValLink" data-pltdoc="x">eqv-hash-code</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._fixnum~3f%29%29" class="RktValLink" data-pltdoc="x">fixnum?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="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 a <a href="numbers.html#%28tech._fixnum%29" class="techoutside" data-pltdoc="x"><span class="techinside">fixnum</span></a>; for any two calls with <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> values,
the returned number is the same.</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._((quote._~23~25kernel)._equal-hash-code))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._equal-hash-code%29%29" class="RktValDef RktValLink" data-pltdoc="x">equal-hash-code</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._fixnum~3f%29%29" class="RktValLink" data-pltdoc="x">fixnum?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="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 a <a href="numbers.html#%28tech._fixnum%29" class="techoutside" data-pltdoc="x"><span class="techinside">fixnum</span></a>; for any two calls 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> values,
the returned number is the same. A hash code is computed even when
<span class="RktVar">v</span> contains a cycle through pairs, vectors, boxes, and/or
inspectable structure fields. See also <span class="RktSym"><a href="booleans.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._gen~3aequal%2Bhash%29%29" class="RktValLink" data-pltdoc="x">gen:equal+hash</a></span>.</div></p><p>For any <span class="RktVar">v</span> that could be produced by <span class="RktSym"><a href="Reading.html#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span>, if
<span class="RktSym">v2</span> is produced by <span class="RktSym"><a href="Reading.html#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span> for the same input
characters, the <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._equal-hash-code%29%29" class="RktValLink" data-pltdoc="x">equal-hash-code</a></span><span class="stt"> </span><span class="RktVar">v</span><span class="RktPn">)</span> is the same as
<span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._equal-hash-code%29%29" class="RktValLink" data-pltdoc="x">equal-hash-code</a></span><span class="stt"> </span><span class="RktSym">v2</span><span class="RktPn">)</span> &#8212;<wbr></wbr> even if <span class="RktVar">v</span> and <span class="RktSym">v2</span>
do not exist at the same time (and therefore could not be compared by
calling <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>).</p><p class="SHistory">Changed in version 6.4.0.12 of package <span class="stt">base</span>: Strengthened guarantee for <span class="RktSym"><a href="Reading.html#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span>able values.</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._((quote._~23~25kernel)._equal-secondary-hash-code))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._equal-secondary-hash-code%29%29" class="RktValDef RktValLink" data-pltdoc="x">equal-secondary-hash-code</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._fixnum~3f%29%29" class="RktValLink" data-pltdoc="x">fixnum?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="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">Like <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._equal-hash-code%29%29" class="RktValLink" data-pltdoc="x">equal-hash-code</a></span>, but computes a secondary value suitable
for use in double hashing.</div></p><h5 x-source-module="(lib &quot;scribblings/reference/reference.scrbl&quot;)" x-source-pkg="racket-doc" x-part-tag="&quot;Additional_Hash_Table_Functions&quot;">4.13.1<tt>&nbsp;</tt><a name="(part._.Additional_.Hash_.Table_.Functions)"></a><a name="(mod-path._racket/hash)"></a>Additional Hash Table Functions</h5><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="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="#%28mod-path._racket%2Fhash%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/hash</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The bindings documented in this section are provided by the <a href="#%28mod-path._racket%2Fhash%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/hash</span></a> library, not <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a> or <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket</span></a>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/hash..rkt)._hash-union))"></a><span title="Provided from: racket/hash | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fhash..rkt%29._hash-union%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-union</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">h0</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">h</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktPn">#:combine</span><span class="hspace">&nbsp;</span><span class="RktVar">combine</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">#:combine/key</span><span class="hspace">&nbsp;</span><span class="RktVar">combine/key</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym">hash-can-functional-set?</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">h0</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym">hash-can-functional-set?</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">h</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">combine</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><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">-&gt;</span></a></span><span class="hspace">&nbsp;</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">&nbsp;</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">&nbsp;</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 valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29.__%29%29" class="RktStxLink" data-pltdoc="x">_</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="exns.html#%28def._%28%28quote._~23~25kernel%29._error%29%29" class="RktValLink" data-pltdoc="x">error</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">hash-union</span><span class="hspace">&nbsp;</span><span class="RktSym">....</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">combine/key</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><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">-&gt;</span></a></span><span class="hspace">&nbsp;</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">&nbsp;</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">&nbsp;</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">&nbsp;</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 valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">k</span><span class="hspace">&nbsp;</span><span class="RktSym">a</span><span class="hspace">&nbsp;</span><span class="RktSym">b</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktVar">combine</span><span class="hspace">&nbsp;</span><span class="RktSym">a</span><span class="hspace">&nbsp;</span><span class="RktSym">b</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Computes the union of <span class="RktVar">h0</span> with each hash table <span class="RktVar">h</span> by functional
update, adding each element of each <span class="RktVar">h</span> to <span class="RktVar">h0</span> in turn.  For each
key <span class="RktSym">k</span> and value <span class="RktSym">v</span>, if a mapping from <span class="RktSym">k</span> to some value
<span class="RktSym">v0</span> already exists, it is replaced with a mapping from <span class="RktSym">k</span> to
<span class="RktPn">(</span><span class="RktVar">combine/key</span><span class="stt"> </span><span class="RktSym">k</span><span class="stt"> </span><span class="RktSym">v0</span><span class="stt"> </span><span class="RktSym">v</span><span class="RktPn">)</span>.</div></p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fhash..rkt%29._hash-union%29%29" class="RktValLink" data-pltdoc="x">hash-union</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-immutable-hash%29%29" class="RktValLink" data-pltdoc="x">make-immutable-hash</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">[</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">. </span><span class="RktVal">one</span><span class="RktVal">]</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-immutable-hash%29%29" class="RktValLink" data-pltdoc="x">make-immutable-hash</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">[</span><span class="RktVal">2</span><span class="hspace">&nbsp;</span><span class="RktVal">. </span><span class="RktVal">two</span><span class="RktVal">]</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-immutable-hash%29%29" class="RktValLink" data-pltdoc="x">make-immutable-hash</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">[</span><span class="RktVal">3</span><span class="hspace">&nbsp;</span><span class="RktVal">. </span><span class="RktVal">three</span><span class="RktVal">]</span><span class="RktVal">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'#hash((1 . one) (3 . three) (2 . two))</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fhash..rkt%29._hash-union%29%29" class="RktValLink" data-pltdoc="x">hash-union</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-immutable-hash%29%29" class="RktValLink" data-pltdoc="x">make-immutable-hash</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">[</span><span class="RktVal">1</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">one</span><span class="hspace">&nbsp;</span><span class="RktVal">uno</span><span class="RktVal">]</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktVal">[</span><span class="RktVal">2</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">two</span><span class="hspace">&nbsp;</span><span class="RktVal">dos</span><span class="RktVal">]</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-immutable-hash%29%29" class="RktValLink" data-pltdoc="x">make-immutable-hash</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">[</span><span class="RktVal">1</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">ein</span><span class="hspace">&nbsp;</span><span class="RktVal">une</span><span class="RktVal">]</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktVal">[</span><span class="RktVal">2</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">zwei</span><span class="hspace">&nbsp;</span><span class="RktVal">deux</span><span class="RktVal">]</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">#:combine/key</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">k</span><span class="hspace">&nbsp;</span><span class="RktSym">v1</span><span class="hspace">&nbsp;</span><span class="RktSym">v2</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._append%29%29" class="RktValLink" data-pltdoc="x">append</a></span><span class="hspace">&nbsp;</span><span class="RktSym">v1</span><span class="hspace">&nbsp;</span><span class="RktSym">v2</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'#hash((1 . (one uno ein une)) (2 . (two dos zwei deux)))</span></p></td></tr></table></blockquote></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/hash..rkt)._hash-union!))"></a><span title="Provided from: racket/hash | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fhash..rkt%29._hash-union%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-union!</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">h0</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">h</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktPn">#:combine</span><span class="hspace">&nbsp;</span><span class="RktVar">combine</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">#:combine/key</span><span class="hspace">&nbsp;</span><span class="RktVar">combine/key</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><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></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">h0</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace">&nbsp;</span><span class="RktSym">hash-mutable?</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">h</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">combine</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><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">-&gt;</span></a></span><span class="hspace">&nbsp;</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">&nbsp;</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">&nbsp;</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 valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29.__%29%29" class="RktStxLink" data-pltdoc="x">_</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="exns.html#%28def._%28%28quote._~23~25kernel%29._error%29%29" class="RktValLink" data-pltdoc="x">error</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">hash-union</span><span class="hspace">&nbsp;</span><span class="RktSym">....</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">combine/key</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><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">-&gt;</span></a></span><span class="hspace">&nbsp;</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">&nbsp;</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">&nbsp;</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">&nbsp;</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 valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">k</span><span class="hspace">&nbsp;</span><span class="RktSym">a</span><span class="hspace">&nbsp;</span><span class="RktSym">b</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktVar">combine</span><span class="hspace">&nbsp;</span><span class="RktSym">a</span><span class="hspace">&nbsp;</span><span class="RktSym">b</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Computes the union of <span class="RktVar">h0</span> with each hash table <span class="RktVar">h</span> by mutable
update, adding each element of each <span class="RktVar">h</span> to <span class="RktVar">h0</span> in turn.  For each
key <span class="RktSym">k</span> and value <span class="RktSym">v</span>, if a mapping from <span class="RktSym">k</span> to some value
<span class="RktSym">v0</span> already exists, it is replaced with a mapping from <span class="RktSym">k</span> to
<span class="RktPn">(</span><span class="RktVar">combine/key</span><span class="stt"> </span><span class="RktSym">k</span><span class="stt"> </span><span class="RktSym">v0</span><span class="stt"> </span><span class="RktSym">v</span><span class="RktPn">)</span>.</div></p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </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">&nbsp;</span><span class="RktVar">h</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-hash%29%29" class="RktValLink" data-pltdoc="x">make-hash</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt">&gt; </span><span class="RktVar">h</span></td></tr><tr><td><p><span class="RktRes">'#hash()</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fhash..rkt%29._hash-union%21%29%29" class="RktValLink" data-pltdoc="x">hash-union!</a></span><span class="hspace">&nbsp;</span><span class="RktVar">h</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-immutable-hash%29%29" class="RktValLink" data-pltdoc="x">make-immutable-hash</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">[</span><span class="RktVal">1</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">one</span><span class="hspace">&nbsp;</span><span class="RktVal">uno</span><span class="RktVal">]</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktVal">[</span><span class="RktVal">2</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">two</span><span class="hspace">&nbsp;</span><span class="RktVal">dos</span><span class="RktVal">]</span><span class="RktVal">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt">&gt; </span><span class="RktVar">h</span></td></tr><tr><td><p><span class="RktRes">'#hash((2 . (two dos)) (1 . (one uno)))</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fhash..rkt%29._hash-union%21%29%29" class="RktValLink" data-pltdoc="x">hash-union!</a></span><span class="hspace">&nbsp;</span><span class="RktVar">h</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-immutable-hash%29%29" class="RktValLink" data-pltdoc="x">make-immutable-hash</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">[</span><span class="RktVal">1</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">ein</span><span class="hspace">&nbsp;</span><span class="RktVal">une</span><span class="RktVal">]</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktVal">[</span><span class="RktVal">2</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">zwei</span><span class="hspace">&nbsp;</span><span class="RktVal">deux</span><span class="RktVal">]</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">#:combine/key</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">k</span><span class="hspace">&nbsp;</span><span class="RktSym">v1</span><span class="hspace">&nbsp;</span><span class="RktSym">v2</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._append%29%29" class="RktValLink" data-pltdoc="x">append</a></span><span class="hspace">&nbsp;</span><span class="RktSym">v1</span><span class="hspace">&nbsp;</span><span class="RktSym">v2</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktVar">h</span></td></tr><tr><td><p><span class="RktRes">'#hash((2 . (two dos zwei deux)) (1 . (one uno ein une)))</span></p></td></tr></table></blockquote></div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="boxes.html" title="backward to &quot;4.12 Boxes&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="data.html" title="up to &quot;4 Datatypes&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="sequences_streams.html" title="forward to &quot;4.14 Sequences and Streams&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>