This file is indexed.

/usr/share/doc/racket/data/Enumerations.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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<!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>11&nbsp;Enumerations</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9660;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Data:<span class="mywbr"> &nbsp;</span> Data Structures</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="Imperative_Queues.html" class="tocviewlink" data-pltdoc="x">Imperative Queues</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="gvector.html" class="tocviewlink" data-pltdoc="x">Growable Vectors</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="Orders_and_Ordered_Dictionaries.html" class="tocviewlink" data-pltdoc="x">Orders and Ordered Dictionaries</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="Splay_Trees.html" class="tocviewlink" data-pltdoc="x">Splay Trees</a></td></tr><tr><td align="right">5&nbsp;</td><td><a href="skip-list.html" class="tocviewlink" data-pltdoc="x">Skip Lists</a></td></tr><tr><td align="right">6&nbsp;</td><td><a href="interval-map.html" class="tocviewlink" data-pltdoc="x">Interval Maps</a></td></tr><tr><td align="right">7&nbsp;</td><td><a href="Binary_Heaps.html" class="tocviewlink" data-pltdoc="x">Binary Heaps</a></td></tr><tr><td align="right">8&nbsp;</td><td><a href="integer-set.html" class="tocviewlink" data-pltdoc="x">Integer Sets</a></td></tr><tr><td align="right">9&nbsp;</td><td><a href="bit-vector.html" class="tocviewlink" data-pltdoc="x">Bit Vectors</a></td></tr><tr><td align="right">10&nbsp;</td><td><a href="union-find.html" class="tocviewlink" data-pltdoc="x">Union-<wbr></wbr>Find:<span class="mywbr"> &nbsp;</span> Sets with only Canonical Elements</a></td></tr><tr><td align="right">11&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Enumerations</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;);">&#9658;</a></td><td>11&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Enumerations</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">11.1&nbsp;</td><td><a href="#%28part._.Enumeration_.Properties%29" class="tocviewlink" data-pltdoc="x">Enumeration Properties</a></td></tr><tr><td align="right">11.2&nbsp;</td><td><a href="#%28part._.Querying_.Enumerations%29" class="tocviewlink" data-pltdoc="x">Querying Enumerations</a></td></tr><tr><td align="right">11.3&nbsp;</td><td><a href="#%28part._.Constructing_.Enumerations%29" class="tocviewlink" data-pltdoc="x">Constructing Enumerations</a></td></tr><tr><td align="right">11.4&nbsp;</td><td><a href="#%28part._.More_.Enumeration_.Operations%29" class="tocviewlink" data-pltdoc="x">More Enumeration Operations</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">11.1<tt>&nbsp;</tt></span><a href="#%28part._.Enumeration_.Properties%29" class="tocsubseclink" data-pltdoc="x">Enumeration Properties</a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">enum?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">finite-<wbr></wbr>enum?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">infinite-<wbr></wbr>enum?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">two-<wbr></wbr>way-<wbr></wbr>enum?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._one-way-enum~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">one-<wbr></wbr>way-<wbr></wbr>enum?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">flat-<wbr></wbr>enum?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-count%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">enum-<wbr></wbr>count</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-contract%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">enum-<wbr></wbr>contract</span></span></a></td></tr><tr><td><span class="tocsublinknumber">11.2<tt>&nbsp;</tt></span><a href="#%28part._.Querying_.Enumerations%29" class="tocsubseclink" data-pltdoc="x">Querying Enumerations</a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">from-<wbr></wbr>nat</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">to-<wbr></wbr>nat</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">enum-<wbr></wbr>&gt;list</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._in-enum%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">in-<wbr></wbr>enum</span></span></a></td></tr><tr><td><span class="tocsublinknumber">11.3<tt>&nbsp;</tt></span><a href="#%28part._.Constructing_.Enumerations%29" class="tocsubseclink" data-pltdoc="x">Constructing Enumerations</a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">natural/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._below%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">below/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._empty%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">empty/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._map%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">map/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._pam%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pam/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._except%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">except/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._or%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">or/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._append%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">append/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._thunk%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">thunk/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">list/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._dep%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">dep/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._bounded-list%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bounded-<wbr></wbr>list/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><span class="tocsublinknumber">11.4<tt>&nbsp;</tt></span><a href="#%28part._.More_.Enumeration_.Operations%29" class="tocsubseclink" data-pltdoc="x">More Enumeration Operations</a></td></tr><tr><td><span class="tocsublinknumber">11.4.1<tt>&nbsp;</tt></span><a href="#%28part._.More_.Enumeration_.Constructors%29" class="tocsubseclink" data-pltdoc="x">More Enumeration Constructors</a></td></tr><tr><td><a href="#%28form._%28%28lib._data%2Fenumerate%2Flib..rkt%29._cons%2Fde%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">cons/<span class="mywbr"> &nbsp;</span>de</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._flip-dep%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">flip-<wbr></wbr>dep/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._cons%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">cons/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._listof%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">listof/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._non-empty-listof%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">non-<wbr></wbr>empty-<wbr></wbr>listof/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._listof-n%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">listof-<wbr></wbr>n/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._data%2Fenumerate%2Flib..rkt%29._delay%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">delay/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._take%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">take/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._slice%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">slice/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._fin%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">fin/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._single%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">single/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._range%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">range/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._nat%2B%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">nat+<span class="mywbr"> &nbsp;</span>/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._vector%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">vector/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._permutations-of-n%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">permutations-<wbr></wbr>of-<wbr></wbr>n/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._permutations%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">permutations/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._set%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">set/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._infinite-sequence%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">infinite-<wbr></wbr>sequence/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._hash-traverse%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">hash-<wbr></wbr>traverse/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._fold-enum%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">fold-<wbr></wbr>enum</span></span></a></td></tr><tr><td><span class="tocsublinknumber">11.4.2<tt>&nbsp;</tt></span><a href="#%28part._.Enumeration_.Utility%29" class="tocsubseclink" data-pltdoc="x">Enumeration Utility</a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._random-index%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">random-<wbr></wbr>index</span></span></a></td></tr><tr><td><span class="tocsublinknumber">11.4.3<tt>&nbsp;</tt></span><a href="#%28part._.Pre-built_.Enumerations%29" class="tocsubseclink" data-pltdoc="x">Pre-<wbr></wbr>built Enumerations</a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._char%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">char/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._string%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">string/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._bool%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bool/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._symbol%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">symbol/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._integer%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">integer/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._flonum%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">flonum/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._exact-rational%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exact-<wbr></wbr>rational/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._two-way-real%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">two-<wbr></wbr>way-<wbr></wbr>real/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._real%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">real/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._two-way-number%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">two-<wbr></wbr>way-<wbr></wbr>number/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._number%2Fe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">number/<span class="mywbr"> &nbsp;</span>e</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="version">6.7</span></div><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.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="union-find.html" title="backward to &quot;10 Union-Find: Sets with only Canonical Elements&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;Data: Data Structures&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<span class="nonavigation">next &rarr;</span></span>&nbsp;</div><h3 x-source-module="(lib &quot;data/scribblings/data.scrbl&quot;)" x-source-pkg="data-doc" x-part-tag="&quot;Enumerations&quot;">11<tt>&nbsp;</tt><a name="(part._.Enumerations)"></a><a name="(mod-path._data/enumerate)"></a>Enumerations</h3><div class="SAuthorListBox"><span class="SAuthorList"><p class="author">Max S. New &lt;<a href="mailto:maxnew@ccs.neu.edu">maxnew@ccs.neu.edu</a>&gt;</p></span></div><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">data/enumerate</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">data-enumerate-lib</span></span></td></tr></table></p><p>This library defines <a name="(tech._enumeration)"></a><span style="font-style: italic">enumerations</span>. Enumerations
are represented as bijections between the natural numbers (or a prefix of
them) and the values of some contract. Most of the
enumerations defined in this library guarantee that the
constructed bijection is efficient, in the sense that
decoding a number is roughly linear in the number of bits
taken to represent the number.</p><p><div class="SIntrapara">The two main options on an enumeration convert natural numbers
back (<span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span>) and forth (<span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span>) between
the elements of the contract. The simplest enumeration,
<span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span> is just a pair of identity functions:
</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">0</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">1</span></p></td></tr></table></blockquote></div><div class="SIntrapara">but the library builds up more complex enumerations from
simple ones. For example, you can enumerate lists of the
elements of other enumerations using <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span>:
</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 0 0)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 0 1)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._expt%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">expt</a></span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="hspace">&nbsp;</span><span class="RktVal">100</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(10822639409 2238661967 110761420)</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._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></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;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVal">123456789</span><span class="hspace">&nbsp;</span><span class="RktVal">123456789</span><span class="hspace">&nbsp;</span><span class="RktVal">123456789</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">1881676417513891481838999</span></p></td></tr></table></blockquote></div><div class="SIntrapara">To interleave two enumerations, use <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._or%2Fe%29%29" class="RktValLink" data-pltdoc="x">or/e</a></span>:
</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._or%2Fe%29%29" class="RktValLink" data-pltdoc="x">or/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">0</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._or%2Fe%29%29" class="RktValLink" data-pltdoc="x">or/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 0)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._or%2Fe%29%29" class="RktValLink" data-pltdoc="x">or/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">1</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._or%2Fe%29%29" class="RktValLink" data-pltdoc="x">or/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 1)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._or%2Fe%29%29" class="RktValLink" data-pltdoc="x">or/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">4</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">2</span></p></td></tr></table></blockquote></div><div class="SIntrapara">and to construct recursive data structures, use
<span class="RktSym"><a href="#%28form._%28%28lib._data%2Fenumerate%2Flib..rkt%29._delay%2Fe%29%29" class="RktStxLink" data-pltdoc="x">delay/e</a></span> (with a little help from <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._single%2Fe%29%29" class="RktValLink" data-pltdoc="x">single/e</a></span> to
build a singleton enumeration for the base-case):
</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">bt/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._data%2Fenumerate%2Flib..rkt%29._delay%2Fe%29%29" class="RktStxLink" data-pltdoc="x">delay/e</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._or%2Fe%29%29" class="RktValLink" data-pltdoc="x">or/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._single%2Fe%29%29" class="RktValLink" data-pltdoc="x">single/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym">bt/e</span><span class="hspace">&nbsp;</span><span class="RktSym">bt/e</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p>&nbsp;</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._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">bt/e</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">bt/e</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(#f #f)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">bt/e</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(#f (#f #f))</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">bt/e</span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'((#f #f) #f)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">bt/e</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._expt%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">expt</a></span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="hspace">&nbsp;</span><span class="RktVal">100</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktRes">'(((((((#f #f) #f) (#f (#f #f))) (((#f (#f #f)) (#f #f)) ((#f #f) #f)))</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(((#f #f) (#f #f)) (#f ((#f #f) (#f (#f #f))))))</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(((((#f #f) #f) (#f (#f #f))) (((#f (#f #f)) (#f #f)) ((#f #f) #f)))</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(((#f #f) #f) (#f ((#f #f) (#f (#f #f)))))))</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">((((((#f #f) #f) (#f (#f #f))) (((#f (#f #f)) (#f #f)) ((#f #f) #f)))</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(((#f #f) (#f #f)) (#f ((#f #f) (#f (#f #f))))))</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(((((#f #f) #f) (#f (#f #f))) (((#f (#f #f)) (#f #f)) ((#f #f) #f)))</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(((#f #f) #f) (#f ((#f #f) (#f (#f #f))))))))</span></p></td></tr></table></td></tr></table></td></tr></table></blockquote></div></p><p><div class="SIntrapara">The library also supports dependent enumerations. For example,
to build ordered pairs, we can allow any natural number
in the first component, but we want to have only natural
numbers that are larger than that in the second component.
The <span class="RktSym"><a href="#%28form._%28%28lib._data%2Fenumerate%2Flib..rkt%29._cons%2Fde%29%29" class="RktStxLink" data-pltdoc="x">cons/de</a></span> lets us express the dependency (using a notation
similar to the contract <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._cons%252Fdc%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">cons/dc</a></span>) and then we can
use <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._nat%2B%2Fe%29%29" class="RktValLink" data-pltdoc="x">nat+/e</a></span>, which builds a enumerators of natural numbers
that are larger than or equal to its argument:
</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">ordered-pair/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._data%2Fenumerate%2Flib..rkt%29._cons%2Fde%29%29" class="RktStxLink" data-pltdoc="x">cons/de</a></span><span class="hspace">&nbsp;</span><span class="RktPn">[</span><span class="RktSym">hd</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym">tl</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">hd</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._nat%2B%2Fe%29%29" class="RktValLink" data-pltdoc="x">nat+/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="hspace">&nbsp;</span><span class="RktSym">hd</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p>&nbsp;</p></td></tr><tr><td><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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=for.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._for%252Flist%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">for/list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">i</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=sequences.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._in-range%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">in-range</a></span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">ordered-pair/e</span><span class="hspace">&nbsp;</span><span class="RktSym">i</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktRes">'((0 . 1)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 . 2)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 . 2)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 . 3)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 . 3)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 . 4)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(2 . 3)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(2 . 4)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(2 . 5)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 . 4))</span></p></td></tr></table></td></tr></table></td></tr></table></blockquote></div></p><p><div class="SIntrapara">Sometimes the best way to get a new enumeration is to adjust
the output of a previous one. For example, if we wanted
ordered pairs that were ordered in the other direction, we
just need to swap the components of the pair from the
<span class="RktSym">ordered-pair/e</span> enumeration. The function
<span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._map%2Fe%29%29" class="RktValLink" data-pltdoc="x">map/e</a></span> adjusts existing enumerations. It accepts a
contract describing the new kinds of values and functions
that convert back and forth between the new and old kinds of
values.
</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">swap-components</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._cons%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">cons</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._cdr%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">cdr</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._car%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">car</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">other-ordered-pair/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._map%2Fe%29%29" class="RktValLink" data-pltdoc="x">map/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym">swap-components</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym">swap-components</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym">ordered-pair/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">#:contract</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._cons%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p>&nbsp;</p></td></tr><tr><td><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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=for.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._for%252Flist%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">for/list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">i</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=sequences.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._in-range%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">in-range</a></span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">other-ordered-pair/e</span><span class="hspace">&nbsp;</span><span class="RktSym">i</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktRes">'((1 . 0)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(2 . 0)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(2 . 1)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(3 . 1)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(3 . 0)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(4 . 1)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(3 . 2)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(4 . 2)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(5 . 2)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(4 . 0))</span></p></td></tr></table></td></tr></table></td></tr></table></blockquote></div></p><p><div class="SIntrapara">Some of the combinators in the library are guaranteed to build
enumeration functions that are bijections. But since <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._map%2Fe%29%29" class="RktValLink" data-pltdoc="x">map/e</a></span>
accepts arbitrary functions and <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._or%2Fe%29%29" class="RktValLink" data-pltdoc="x">or/e</a></span> accepts enumerations with
arbitrary contracts, they may project enumerations that are not be bijections.
To help avoid errors, the contracts on <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._map%2Fe%29%29" class="RktValLink" data-pltdoc="x">map/e</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._or%2Fe%29%29" class="RktValLink" data-pltdoc="x">or/e</a></span> does some
random checking to see if the result would be a bijection.
Here&rsquo;s an example that, with high probability, signals a contract violation.
</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._data%2Fenumerate..rkt%29._map%2Fe%29%29" class="RktValLink" data-pltdoc="x">map/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._floor%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">floor</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252F%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">/</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktVal">100</span><span class="RktPn">)</span><span class="RktPn">)</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;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252A%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">*</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktVal">100</span><span class="RktPn">)</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;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">#:contract</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">map/e: contract violation;</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;</span><span class="RktErr">new enumeration would not be two-way</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;</span><span class="RktErr">passing 258 to `from-nat` produces:</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">258</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;</span><span class="RktErr">which, when passed through `in' and `out', produces:</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">200</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;</span><span class="RktErr">which, when passed to `to-nat' produces 200,</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;</span><span class="RktErr">but it should have been 258</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">in: (-&gt;i</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">((in</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(e es c)</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(dynamic-&gt;*</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">#:mandatory-domain-contracts</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(map enum-contract (cons e es))</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">#:range-contracts</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(list c)))</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(out</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(e es c)</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(dynamic-&gt;*</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">#:mandatory-domain-contracts</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(list c)</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">#:range-contracts</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(map enum-contract (cons e es))))</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(e enum?)</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">#:contract</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(c contract?))</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">#:rest</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(es (listof enum?))</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">#:pre/desc</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(in out e es)</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(appears-to-be-a-bijection?</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">in</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">out</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(cons e es))</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(result enum?))</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">contract from: </span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">&lt;pkgs&gt;/data-enumerate-lib/data/enumerate.rkt</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">blaming: top-level</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;</span><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">(assuming the contract is correct)</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktErr">at: &lt;pkgs&gt;/data-enumerate-lib/data/enumerate.rkt:45.3</span></p></td></tr></table></blockquote></div><div class="SIntrapara">The contract on <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._or%2Fe%29%29" class="RktValLink" data-pltdoc="x">or/e</a></span> has a similar kind of checking that attempts to
find overlaps between the elements of the enumerations in its arguments.</div></p><p>Sometimes, there is no easy way to make two functions that form a bijection. In
that case you can use <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._pam%2Fe%29%29" class="RktValLink" data-pltdoc="x">pam/e</a></span> and supply only one function
to make a <a href="#%28tech._one._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">one way enumeration</span></a>. For example,
we can make an enumeration of picts of binary trees like this:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">pict-bt/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._pam%2Fe%29%29" class="RktValLink" data-pltdoc="x">pam/e</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">bt</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=pict&amp;rel=Tree_Layout.html%23%2528def._%2528%2528lib._pict%252Ftree-layout..rkt%2529._binary-tidier%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">binary-tidier</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._let%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">let</a></span><span class="hspace">&nbsp;</span><span class="RktSym">loop</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">bt</span><span class="hspace">&nbsp;</span><span class="RktSym">bt</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._cond%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">cond</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list?</a></span><span class="hspace">&nbsp;</span><span class="RktSym">bt</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=procedures.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._apply%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">apply</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=pict&amp;rel=Tree_Layout.html%23%2528def._%2528%2528lib._pict%252Ftree-layout..rkt%2529._tree-layout%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">tree-layout</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmap..rkt%2529._map%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">map</a></span><span class="hspace">&nbsp;</span><span class="RktSym">loop</span><span class="hspace">&nbsp;</span><span class="RktSym">bt</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._else%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">else</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktSym">bt/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">#:contract</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=pict&amp;rel=Pict_Datatype.html%23%2528def._%2528%2528lib._pict%252Fmain..rkt%2529._pict%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">pict?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p>&nbsp;</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._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">pict-bt/e</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><p><img style="vertical-align: -0.0px; margin: -3px -3px -3px -3px;" src="pict.png" alt="image" width="38" height="78.0"/></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">pict-bt/e</span><span class="hspace">&nbsp;</span><span class="RktVal">11</span><span class="RktPn">)</span></td></tr><tr><td><p><img style="vertical-align: -0.0px; margin: -3px -3px -3px -3px;" src="pict_2.png" alt="image" width="54" height="78.0"/></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">pict-bt/e</span><span class="hspace">&nbsp;</span><span class="RktVal">12</span><span class="RktPn">)</span></td></tr><tr><td><p><img style="vertical-align: -0.0px; margin: -3px -3px -3px -3px;" src="pict_3.png" alt="image" width="86" height="78.0"/></p></td></tr></table></td></tr></table></blockquote><p>Putting all these pieces together, here is a definition of
an enumeration of closed expressions of the untyped
lambda calculus.</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=attaching-contracts-to-values.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fregion..rkt%2529._define%252Fcontract%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define/contract</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lc-var/e</span><span class="hspace">&nbsp;</span><span class="RktSym">bvs</span><span class="hspace">&nbsp;</span><span class="RktSym">memo</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=sets.html%23%2528def._%2528%2528lib._racket%252Fset..rkt%2529._set%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">set/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fhash..rkt%2529._hash%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">hash/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=sets.html%23%2528def._%2528%2528lib._racket%252Fset..rkt%2529._set%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">set/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktCmt">;</span><span class="RktCmt">&nbsp;</span><span class="RktCmt">memoization is a significant performance improvement</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=hashtables.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmore-scheme..rkt%2529._hash-ref%2521%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">hash-ref!</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktSym">memo</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktSym">bvs</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._data%2Fenumerate%2Flib..rkt%29._delay%2Fe%29%29" class="RktStxLink" data-pltdoc="x">delay/e</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._or%2Fe%29%29" class="RktValLink" data-pltdoc="x">or/e</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktCmt">;</span><span class="RktCmt">&nbsp;</span><span class="RktCmt">the variables currently in scope</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=procedures.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._apply%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">apply</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._fin%2Fe%29%29" class="RktValLink" data-pltdoc="x">fin/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=sets.html%23%2528def._%2528%2528lib._racket%252Fset..rkt%2529._set-%7E3elist%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">set-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym">bvs</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktCmt">;</span><span class="RktCmt">&nbsp;</span><span class="RktCmt">the &#955; case; first we build a dependent</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktCmt">;</span><span class="RktCmt">&nbsp;</span><span class="RktCmt">pair of a bound variable and a body expression</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktCmt">;</span><span class="RktCmt">&nbsp;</span><span class="RktCmt">and then use map/e to build the usual syntax</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._map%2Fe%29%29" class="RktValLink" data-pltdoc="x">map/e</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">pr</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">`</span><span class="RktVal">(</span><span class="RktVal">&#955;</span><span class="hspace">&nbsp;</span><span class="RktVal">(</span><span class="RktRdr">,</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._car%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">car</a></span><span class="hspace">&nbsp;</span><span class="RktSym">pr</span><span class="RktPn">)</span><span class="RktVal">)</span><span class="hspace">&nbsp;</span><span class="RktRdr">,</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._cdr%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">cdr</a></span><span class="hspace">&nbsp;</span><span class="RktSym">pr</span><span class="RktPn">)</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">&#955;-exp</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._cons%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">cons</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._caadr%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">caadr</a></span><span class="hspace">&nbsp;</span><span class="RktSym">&#955;-exp</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._caddr%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">caddr</a></span><span class="hspace">&nbsp;</span><span class="RktSym">&#955;-exp</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._data%2Fenumerate%2Flib..rkt%29._cons%2Fde%29%29" class="RktStxLink" data-pltdoc="x">cons/de</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym">hd</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._symbol%2Fe%29%29" class="RktValLink" data-pltdoc="x">symbol/e</a></span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym">tl</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">hd</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lc-var/e</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=sets.html%23%2528def._%2528%2528lib._racket%252Fset..rkt%2529._set-add%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">set-add</a></span><span class="hspace">&nbsp;</span><span class="RktSym">bvs</span><span class="hspace">&nbsp;</span><span class="RktSym">hd</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">memo</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">#:contract</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._list%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">&#955;</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._list%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">lc-exp?</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktCmt">;</span><span class="RktCmt">&nbsp;</span><span class="RktCmt">application expressions</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lc-var/e</span><span class="hspace">&nbsp;</span><span class="RktSym">bvs</span><span class="hspace">&nbsp;</span><span class="RktSym">memo</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lc-var/e</span><span class="hspace">&nbsp;</span><span class="RktSym">bvs</span><span class="hspace">&nbsp;</span><span class="RktSym">memo</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lc-exp?</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=match.html%23%2528form._%2528%2528lib._racket%252Fmatch..rkt%2529._match%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">match</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">?</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">#t</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktVal">`</span><span class="RktVal">(</span><span class="RktVal">&#955;</span><span class="hspace">&nbsp;</span><span class="RktVal">(</span><span class="RktRdr">,</span><span class="RktSym">x</span><span class="RktVal">)</span><span class="hspace">&nbsp;</span><span class="RktRdr">,</span><span class="RktSym">e</span><span class="RktVal">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._and%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">and</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lc-exp?</span><span class="hspace">&nbsp;</span><span class="RktSym">e</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktVal">`</span><span class="RktVal">(</span><span class="RktRdr">,</span><span class="RktSym">a</span><span class="hspace">&nbsp;</span><span class="RktRdr">,</span><span class="RktSym">b</span><span class="RktVal">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._and%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">and</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lc-exp?</span><span class="hspace">&nbsp;</span><span class="RktSym">a</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lc-exp?</span><span class="hspace">&nbsp;</span><span class="RktSym">b</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">lc/e</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lc-var/e</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=sets.html%23%2528def._%2528%2528lib._racket%252Fset..rkt%2529._set%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">set</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=hashtables.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._make-hash%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">make-hash</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p>&nbsp;</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._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">lc/e</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(&#955; (a) a)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">lc/e</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'((&#955; (a) a) (&#955; (a) a))</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">lc/e</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(&#955; (a) (&#955; (a) a))</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._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">lc/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">&#955;</span><span class="hspace">&nbsp;</span><span class="RktVal">(</span><span class="RktVal">f</span><span class="RktVal">)</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;</span><span class="RktVal">(</span><span class="RktVal">(</span><span class="RktVal">&#955;</span><span class="hspace">&nbsp;</span><span class="RktVal">(</span><span class="RktVal">x</span><span class="RktVal">)</span><span class="hspace">&nbsp;</span><span class="RktVal">(</span><span class="RktVal">f</span><span class="hspace">&nbsp;</span><span class="RktVal">(</span><span class="RktVal">x</span><span class="hspace">&nbsp;</span><span class="RktVal">x</span><span class="RktVal">)</span><span class="RktVal">)</span><span class="RktVal">)</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="RktVal">(</span><span class="RktVal">&#955;</span><span class="hspace">&nbsp;</span><span class="RktVal">(</span><span class="RktVal">x</span><span class="RktVal">)</span><span class="hspace">&nbsp;</span><span class="RktVal">(</span><span class="RktVal">f</span><span class="hspace">&nbsp;</span><span class="RktVal">(</span><span class="RktVal">x</span><span class="hspace">&nbsp;</span><span class="RktVal">x</span><span class="RktVal">)</span><span class="RktVal">)</span><span class="RktVal">)</span><span class="RktVal">)</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">65533604995627347825568080010</span></p></td></tr></table></td></tr></table></blockquote><h4 x-source-module="(lib &quot;data/scribblings/data.scrbl&quot;)" x-source-pkg="data-doc" x-part-tag="&quot;Enumeration_Properties&quot;">11.1<tt>&nbsp;</tt><a name="(part._.Enumeration_.Properties)"></a>Enumeration Properties</h4><p>In addition to the functions that form the bijection, an
enumeration also has a contract, a count, and three boolean
properties associated with it: if it is finite
or not, if it is a bijection to the natural numbers or
merely maps from the natural numbers without going back, and
if the contract it has is a <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=contract-utilities.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fguts..rkt%2529._flat-contract%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">flat-contract?</a></span>.</p><p>The functions in this section are predicates for the boolean
properties and selection functions for other properties.</p><p>When an enumeration prints out, it shows the first few elements
of the enumeration and, if it is either a <a href="#%28tech._finite._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">finite enumeration</span></a>
or a <a href="#%28tech._one._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">one way enumeration</span></a>, it prints <span class="RktInBG"><span class="hspace"></span><span class="RktIn">finite</span><span class="hspace"></span></span>
and <span class="RktInBG"><span class="hspace"></span><span class="RktIn">one-way</span><span class="hspace"></span></span>, as appropriate. If those prefixes are not
printed, then the enumeration is not finite and is not one-way.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._enum~3f))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">enum?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">x</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Identifies a value as an <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._finite-enum~3f))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">finite-enum?</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Identifies <a name="(tech._finite._enumeration)"></a><span style="font-style: italic">finite enumerations</span>.
</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._infinite-enum~3f))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">infinite-enum?</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Identifies <a name="(tech._infinite._enumeration)"></a><span style="font-style: italic">infinite enumerations</span>, i. e.,
<a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumerations</span></a> that map all natural numbers.
</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._two-way-enum~3f))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">two-way-enum?</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Identifies <a name="(tech._two._way._enumeration)"></a><span style="font-style: italic">two way enumerations</span>, i. e., <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumerations</span></a>
that can map back and forth from
values that satisfy the enumeration&rsquo;s contract to the natural
numbers.
</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._one-way-enum~3f))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._one-way-enum~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">one-way-enum?</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Identifies <a name="(tech._one._way._enumeration)"></a><span style="font-style: italic">one way enumerations</span>, i. e., <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumerations</span></a>
that can map only from the natural numbers to values that satisfy the
enumeration&rsquo;s contract, but not back.
</div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._flat-enum~3f))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">flat-enum?</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Identifies <a name="(tech._flat._enumeration)"></a><span style="font-style: italic">flat enumerations</span>, i. e., <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumerations</span></a>
whose contracts are <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=contract-utilities.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fguts..rkt%2529._flat-contract%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">flat-contract?</a></span>s.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._enum-count))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-count%29%29" class="RktValDef RktValLink" data-pltdoc="x">enum-count</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the number of elements of an <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._enum-contract))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-contract%29%29" class="RktValDef RktValLink" data-pltdoc="x">enum-contract</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=contract-utilities.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fguts..rkt%2529._contract%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">contract?</a></span> that <span class="RktVar">e</span> enumerates.</div></p><h4 x-source-module="(lib &quot;data/scribblings/data.scrbl&quot;)" x-source-pkg="data-doc" x-part-tag="&quot;Querying_Enumerations&quot;">11.2<tt>&nbsp;</tt><a name="(part._.Querying_.Enumerations)"></a>Querying Enumerations</h4><p>The functions in this section exercise the enumeration,
turning natural numbers back and forth to the values
that an enumeration enumerates.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._from-nat))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValDef RktValLink" data-pltdoc="x">from-nat</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span><span class="RktVar">n</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-contract%29%29" class="RktValLink" data-pltdoc="x">enum-contract</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</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">n</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._integer-in%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-count%29%29" class="RktValLink" data-pltdoc="x">enum-count</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Decodes <span class="RktVar">n</span> from <span class="RktVar">e</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><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._to-nat))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValDef RktValLink" data-pltdoc="x">to-nat</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span><span class="RktVar">x</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" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._integer-in%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-count%29%29" class="RktValLink" data-pltdoc="x">enum-count</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">x</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-contract%29%29" class="RktValLink" data-pltdoc="x">enum-contract</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Encodes <span class="RktVar">x</span> from <span class="RktVar">e</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._enum-~3elist))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValDef RktValLink" data-pltdoc="x">enum-&gt;list</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>[<span class="RktVar">n</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-contract%29%29" class="RktValLink" data-pltdoc="x">enum-contract</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</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">n</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._integer-in%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-count%29%29" class="RktValLink" data-pltdoc="x">enum-count</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="RktPn">)</span></td></tr></table></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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-count%29%29" class="RktValLink" data-pltdoc="x">enum-count</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Returns a list of the first <span class="RktVar">n</span> values in <span class="RktVar">e</span>.</div></p><p>If <span class="RktVar">n</span> is not supplied, then <span class="RktVar">e</span> must be
a finite-enum.</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">8</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'((0 0) (0 1) (1 0) (1 1) (0 2) (1 2) (2 0) (2 1))</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._below%2Fe%29%29" class="RktValLink" data-pltdoc="x">below/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">8</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 1 2 3 4 5 6 7)</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._in-enum))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._in-enum%29%29" class="RktValDef RktValLink" data-pltdoc="x">in-enum</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=sequences.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._sequence%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">sequence?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Constructs a sequence suitable for use with
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=for.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._for%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">for</a></span> loops.</div></p><p>Note that enumerations are also sequences directly, too.</p><p><div class="SIntrapara">Example:</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=for.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._for%252Flist%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">for/list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">i</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._in-enum%29%29" class="RktValLink" data-pltdoc="x">in-enum</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._below%2Fe%29%29" class="RktValLink" data-pltdoc="x">below/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktSym">i</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'(0 1 2 3 4)</span></p></td></tr></table></blockquote></div></p><h4 x-source-module="(lib &quot;data/scribblings/data.scrbl&quot;)" x-source-pkg="data-doc" x-part-tag="&quot;Constructing_Enumerations&quot;">11.3<tt>&nbsp;</tt><a name="(part._.Constructing_.Enumerations)"></a>Constructing Enumerations</h4><p>This section contains the fundamental operations for building
enumerations.</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>value</p></div></div><p class="RForeground"><a name="(def._((lib._data/enumerate..rkt)._natural/e))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">natural/e</a></span></span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of the natural numbers.</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">5</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">5</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._data/enumerate..rkt)._below/e))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._below%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">below/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">max</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" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3d%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">=</a></span><span class="hspace">&nbsp;</span><span class="RktVar">max</span><span class="hspace">&nbsp;</span><span class="RktVal">+inf.0</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">max</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">+inf.0</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of the first <span class="RktVar">max</span> naturals or, if
<span class="RktVar">max</span> is <span class="RktVal">+inf.0</span>, all of the naturals.</div></p><p><div class="SIntrapara">Example:</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._below%2Fe%29%29" class="RktValLink" data-pltdoc="x">below/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 1 2 3 4 5 6 7 8 9)</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>value</p></div></div><p class="RForeground"><a name="(def._((lib._data/enumerate..rkt)._empty/e))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._empty%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">empty/e</a></span></span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">The empty <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a>.</div></p><p><div class="SIntrapara">Example:</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._empty%2Fe%29%29" class="RktValLink" data-pltdoc="x">empty/e</a></span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'()</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._map/e))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._map%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">map/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">f</span><span class="hspace">&nbsp;</span><span class="RktVar">f-inv</span><span class="hspace">&nbsp;</span><span class="RktPn">#:contract</span><span class="hspace">&nbsp;</span><span class="RktVar">c</span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">f</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-contract%29%29" class="RktValLink" data-pltdoc="x">enum-contract</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVar">c</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">f-inv</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktVar">c</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-contract%29%29" class="RktValLink" data-pltdoc="x">enum-contract</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">c</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=contract-utilities.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fguts..rkt%2529._contract%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">contract?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._map%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">map/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">f</span><span class="hspace">&nbsp;</span><span class="RktVar">f-inv</span><span class="hspace">&nbsp;</span><span class="RktPn">#:contract</span><span class="hspace">&nbsp;</span><span class="RktVar">c</span><span class="hspace">&nbsp;</span><span class="RktVar">e</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</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">f</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._dynamic-%7E3e%252A%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">dynamic-&gt;*</a></span><span class="hspace">&nbsp;</span><span class="RktPn">#:mandatory-domain-contracts</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmap..rkt%2529._map%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">map</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-contract%29%29" class="RktValLink" data-pltdoc="x">enum-contract</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">#:range-contracts</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVar">c</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">f-inv</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._dynamic-%7E3e%252A%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">dynamic-&gt;*</a></span><span class="hspace">&nbsp;</span><span class="RktPn">#:mandatory-domain-contracts</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVar">c</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">#:range-contracts</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmap..rkt%2529._map%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">map</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-contract%29%29" class="RktValLink" data-pltdoc="x">enum-contract</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">c</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=contract-utilities.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fguts..rkt%2529._contract%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">contract?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Builds an <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of <span class="RktVar">c</span> from <span class="RktVar">e</span> by
calling <span class="RktVar">f</span> on each element of the enumeration
and <span class="RktVar">f-inv</span> of each value of <span class="RktVar">c</span>.</div></p><p>If multiple enumerations are supplied, <span class="RktVar">f</span> is expected
to accept any combination of elements of the given enumerations,
i. e., the enumerations are not processed in parallel like the
lists in <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmap..rkt%2529._map%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">map</a></span>, but instead any element from the first enumeration
may appear as the first argument to <span class="RktVar">f</span> and any element from
the second may appear as the second argument to <span class="RktVar">f</span>, etc.</p><p>If <span class="RktVar">e</span> is a <a href="#%28tech._one._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">one way enumeration</span></a>, then the result is
a one way enumeration and <span class="RktVar">f-inv</span> is ignored. Otherwise,
the result is a <a href="#%28tech._two._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">two way enumeration</span></a>.</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">evens/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._map%2Fe%29%29" class="RktValLink" data-pltdoc="x">map/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252A%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">*</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</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;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252F%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">/</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</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;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">#:contract</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._even%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">even?</a></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="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym">evens/e</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 2 4 6 8 10 12 14 16 18)</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">odds/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._map%2Fe%29%29" class="RktValLink" data-pltdoc="x">map/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._add1%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">add1</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._sub1%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">sub1</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym">evens/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">#:contract</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._odd%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">odd?</a></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="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym">odds/e</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(1 3 5 7 9 11 13 15 17 19)</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">ordered-pair/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._map%2Fe%29%29" class="RktValLink" data-pltdoc="x">map/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._cons%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">cons</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</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;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">p</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;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._car%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">car</a></span><span class="hspace">&nbsp;</span><span class="RktSym">p</span><span class="RktPn">)</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;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._cdr%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">cdr</a></span><span class="hspace">&nbsp;</span><span class="RktSym">p</span><span class="RktPn">)</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;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=values.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._values%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">values</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._-%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x"><span class="nobreak">-</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</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;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">#:contract</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._cons%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">xy</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3c%7E3d%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">&lt;=</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._car%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">car</a></span><span class="hspace">&nbsp;</span><span class="RktSym">xy</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._cdr%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">cdr</a></span><span class="hspace">&nbsp;</span><span class="RktSym">xy</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym">ordered-pair/e</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktRes">'((0 . 0)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 . 1)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 . 1)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 . 2)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 . 2)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 . 3)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(2 . 2)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(2 . 3)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(2 . 4)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 . 3))</span></p></td></tr></table></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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._pam/e))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._pam%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">pam/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">f</span><span class="hspace">&nbsp;</span><span class="RktPn">#:contract</span><span class="hspace">&nbsp;</span><span class="RktVar">c</span><span class="hspace">&nbsp;</span><span class="RktVar">e</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._one-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">one-way-enum?</a></span></p></blockquote></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">f</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._dynamic-%7E3e%252A%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">dynamic-&gt;*</a></span><span class="hspace">&nbsp;</span><span class="RktPn">#:mandatory-domain-contracts</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmap..rkt%2529._map%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">map</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-contract%29%29" class="RktValLink" data-pltdoc="x">enum-contract</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">#:range-contracts</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVar">c</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">c</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=contract-utilities.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fguts..rkt%2529._contract%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">contract?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Builds a <a href="#%28tech._one._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">one way enumeration</span></a> from the given enumerations,
combining their elements with <span class="RktVar">f</span>, in a manner similar
to <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._map%2Fe%29%29" class="RktValLink" data-pltdoc="x">map/e</a></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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">rationals/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._pam%2Fe%29%29" class="RktValLink" data-pltdoc="x">pam/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252F%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">/</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._nat%2B%2Fe%29%29" class="RktValLink" data-pltdoc="x">nat+/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</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;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._nat%2B%2Fe%29%29" class="RktValLink" data-pltdoc="x">nat+/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">2</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;</span><span class="RktPn">#:contract</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._rational%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">rational?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._positive%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">positive?</a></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="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym">rationals/e</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(1/2 1/3 1 2/3 1/4 1/2 3/2 1 3/4 1/5)</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._except/e))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._except%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">except/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>[<span class="RktPn">#:contract</span><span class="hspace">&nbsp;</span><span class="RktVar">c</span>]<span class="hspace">&nbsp;</span><span class="RktVar">x</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">c</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" 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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=contract-utilities.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fguts..rkt%2529._contract%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">contract?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">x</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-contract%29%29" class="RktValLink" data-pltdoc="x">enum-contract</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a <a href="#%28tech._two._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">two way enumeration</span></a> identical to <span class="RktVar">e</span> except that all
<span class="RktVar">x</span> are removed from the enumeration.</div></p><p>If <span class="RktVar">c</span> is <span class="RktVal">#f</span>, then it is not treated as a contract, instead
the resulting contract is synthesized from contract on <span class="RktVar">e</span>
and the <span class="RktVar">x</span>s.</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">except-1/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._except%2Fe%29%29" class="RktValLink" data-pltdoc="x">except/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">except-1/e</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">2</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">except-1/e</span><span class="hspace">&nbsp;</span><span class="RktVal">4</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">5</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">except-1/e</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">2</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">except-1/e</span><span class="hspace">&nbsp;</span><span class="RktVal">4</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">3</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._or/e))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._or%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">or/e</a></span></span><span class="hspace">&nbsp;</span>[<span class="RktPn">#:one-way-enum?</span><span class="hspace">&nbsp;</span><span class="RktVar">one-way-enum?</span>]<span class="hspace">&nbsp;</span><span class="RktVar">e-p</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">one-way-enum?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e-p</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._cons%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of all of the elements of the enumerations in
the <span class="RktVar">e-p</span> arguments.</div></p><p>If the enumerations have overlapping elements, then pass <span class="RktVal">#f</span> as
<span class="RktVar">one-way-enum?</span> so the result is a <a href="#%28tech._one._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">one way enumeration</span></a>.</p><p>In more detail, if all of the arguments have or are <a href="#%28tech._two._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">two way enumerations</span></a>
and <span class="RktVar">one-way-enum?</span> is <span class="RktVal">#f</span>, then
the result is also a <a href="#%28tech._two._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">two way enumeration</span></a> and
each argument must come with a predicate to distinguish its elements
from the elements of the other enumerations. If the argument is
a pair, then the predicate in the second position of the pair is used.
If the argument is an enumeration, then it must be a <a href="#%28tech._flat._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">flat enumeration</span></a>
and the contract is used as its predicate.</p><p>If any of the arguments are <a href="#%28tech._one._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">one way enumerations</span></a> (or <span class="RktVar">one-way-enum?</span> is
not <span class="RktVal">#f</span>), then the result is a <a href="#%28tech._one._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">one way enumeration</span></a> and any predicates
in the arguments are ignored.</p><p><div class="SIntrapara">Example:</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._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._or%2Fe%29%29" class="RktValLink" data-pltdoc="x">or/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</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="RktVal">10</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'(0 (0 0) 1 (0 1) 2 (1 0) 3 (1 1) 4 (0 2))</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._data/enumerate..rkt)._append/e))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._append%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">append/e</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktPn">#:one-way-enum?</span><span class="hspace">&nbsp;</span><span class="RktVar">one-way-enum?</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">e-p</span><span class="hspace">&nbsp;</span><span class="RktMeta">...+</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">one-way-enum?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e-p</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._cons%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of the elements of the enumerations given in
<span class="RktVar">e-p</span> that enumerates the elements in order that the enumerations
are supplied. All but the last enumeration must be finite.</div></p><p>Like <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._or%2Fe%29%29" class="RktValLink" data-pltdoc="x">or/e</a></span> the resulting enumeration is either a <a href="#%28tech._one._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">one way enumeration</span></a> or
a <a href="#%28tech._two._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">two way enumeration</span></a> depending on the status of the arguments, and
<span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._append%2Fe%29%29" class="RktValLink" data-pltdoc="x">append/e</a></span> has the same constraints on overlapping elements in the
arguments.</p><p><div class="SIntrapara">Example:</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._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._append%2Fe%29%29" class="RktValLink" data-pltdoc="x">append/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._take%2Fe%29%29" class="RktValLink" data-pltdoc="x">take/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">4</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;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'(0 1 2 3 (0 0) (0 1) (1 0) (1 1) (0 2) (1 2))</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._data/enumerate..rkt)._thunk/e))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._thunk%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">thunk/e</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">eth</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">#:count</span><span class="hspace">&nbsp;</span><span class="RktVar">count</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">#:two-way-enum?</span><span class="hspace">&nbsp;</span><span class="RktVar">is-two-way-enum?</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">#:flat-enum?</span><span class="hspace">&nbsp;</span><span class="RktVar">is-flat-enum?</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr></table></blockquote></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">eth</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3d%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">=</a></span><span class="hspace">&nbsp;</span><span class="RktVar">count</span><span class="hspace">&nbsp;</span><span class="RktVal">+inf.0</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._let%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">let</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">matching-count?</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">e</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3d%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">=</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-count%29%29" class="RktValLink" data-pltdoc="x">enum-count</a></span><span class="hspace">&nbsp;</span><span class="RktSym">e</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVar">count</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym">matching-count?</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktVar">is-two-way-enum?</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._one-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">one-way-enum?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktVar">is-flat-enum?</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._not%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">not/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">count</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">+inf.0</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">+inf.0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">is-two-way-enum?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#t</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">is-flat-enum?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">A delayed <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> identical to the result of <span class="RktVar">eth</span>.</div></p><p>The <span class="RktVar">count</span>, <span class="RktVar">is-two-way-enum?</span>, and <span class="RktVar">is-flat-enum?</span>
arguments must be accurate predications of the properties of the result of
<span class="RktVar">eth</span>.</p><p>The argument <span class="RktVar">eth</span> is invoked when the result enumeration&rsquo;s contract
or bijection is used, either directly or indirectly via a call to
<span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-contract%29%29" class="RktValLink" data-pltdoc="x">enum-contract</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span>, or <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span>.</p><p><div class="SIntrapara">Example:</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._letrec%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">letrec</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">bt/e</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._thunk%2Fe%29%29" class="RktValLink" data-pltdoc="x">thunk/e</a></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;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</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="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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%28lib._data%2Fenumerate..rkt%29._or%2Fe%29%29" class="RktValLink" data-pltdoc="x">or/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._single%2Fe%29%29" class="RktValLink" data-pltdoc="x">single/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym">bt/e</span><span class="hspace">&nbsp;</span><span class="RktSym">bt/e</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym">bt/e</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'(#f (#f #f) (#f (#f #f)) ((#f #f) #f) ((#f #f) (#f #f)))</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._list/e))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">list/e</a></span></span><span class="hspace">&nbsp;</span>[<span class="RktPn">#:ordering</span><span class="hspace">&nbsp;</span><span class="RktVar">ordering</span>]<span class="hspace">&nbsp;</span><span class="RktVar">e</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">ordering</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">diagonal</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">square</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">square</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of lists of values enumerated by the
<span class="RktVar">e</span>.</div></p><p>If <span class="RktVar">ordering</span> is <span class="RktVal">'</span><span class="RktVal">square</span>, it uses a generalized form
of Szudzik&rsquo;s &ldquo;elegant&rdquo; ordering and if <span class="RktVar">ordering</span> is <span class="RktVal">'</span><span class="RktVal">diagonal</span>,
it uses a generalized form of Cantor&rsquo;s mapping from pairs of naturals
to naturals.</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._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></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%28lib._data%2Fenumerate%2Flib..rkt%29._fin%2Fe%29%29" class="RktValLink" data-pltdoc="x">fin/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"Brian"</span><span class="hspace">&nbsp;</span><span class="RktVal">"Jenny"</span><span class="hspace">&nbsp;</span><span class="RktVal">"Ki"</span><span class="hspace">&nbsp;</span><span class="RktVal">"Ted"</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="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></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%28lib._data%2Fenumerate%2Flib..rkt%29._fin%2Fe%29%29" class="RktValLink" data-pltdoc="x">fin/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"Terra"</span><span class="hspace">&nbsp;</span><span class="RktVal">"Locke"</span><span class="hspace">&nbsp;</span><span class="RktVal">"Edgar"</span><span class="hspace">&nbsp;</span><span class="RktVal">"Mash"</span><span class="RktPn">)</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="RktVal">5</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktRes">'(("Brian" 0 "Terra")</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">("Jenny" 0 "Terra")</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">("Ki" 0 "Terra")</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">("Ted" 0 "Terra")</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">("Brian" 0 "Locke"))</span></p></td></tr></table></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._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></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="RktVal">10</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'((0 0) (0 1) (1 0) (1 1) (0 2) (1 2) (2 0) (2 1) (2 2) (0 3))</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._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">#:ordering</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktVal">'</span><span class="RktVal">diagonal</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></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="RktVal">10</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'((0 0) (0 1) (1 0) (0 2) (1 1) (2 0) (0 3) (1 2) (2 1) (3 0))</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._data/enumerate..rkt)._dep/e))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._dep%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">dep/e</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">e</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">f</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">#:f-range-finite?</span><span class="hspace">&nbsp;</span><span class="RktVar">f-range-finite?</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">#:flat?</span><span class="hspace">&nbsp;</span><span class="RktVar">flat?</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">#:one-way?</span><span class="hspace">&nbsp;</span><span class="RktVar">one-way?</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</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">f</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-contract%29%29" class="RktValLink" data-pltdoc="x">enum-contract</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktVar">f-range-finite?</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktVar">one-way?</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._one-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">one-way-enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktVar">flat?</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._not%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">not/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">f-range-finite?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">flat?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#t</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">one-way?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._one-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">one-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Constructs an <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of pairs like the first case of <span class="RktSym"><a href="#%28form._%28%28lib._data%2Fenumerate%2Flib..rkt%29._cons%2Fde%29%29" class="RktStxLink" data-pltdoc="x">cons/de</a></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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">dep/e-ordered-pair/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._dep%2Fe%29%29" class="RktValLink" data-pltdoc="x">dep/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">hd</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._nat%2B%2Fe%29%29" class="RktValLink" data-pltdoc="x">nat+/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="hspace">&nbsp;</span><span class="RktSym">hd</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym">dep/e-ordered-pair/e</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktRes">'((0 . 1)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 . 2)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 . 2)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 . 3)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 . 3)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 . 4)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(2 . 3)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(2 . 4)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(2 . 5)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 . 4))</span></p></td></tr></table></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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate..rkt)._bounded-list/e))"></a><span title="Provided from: data/enumerate, data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._bounded-list%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">bounded-list/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">k</span><span class="hspace">&nbsp;</span><span class="RktVar">n</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">k</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">n</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of tuples of naturals with <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._max%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">max</a></span> <span class="RktVar">n</span> of length <span class="RktVar">k</span>.</div></p><p><div class="SIntrapara">Example:</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._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._bounded-list%2Fe%29%29" class="RktValLink" data-pltdoc="x">bounded-list/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="hspace">&nbsp;</span><span class="RktVal">2</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="RktVal">5</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'((0 0 2) (1 0 2) (0 1 2) (1 1 2) (0 2 0))</span></p></td></tr></table></blockquote></div></p><h4 x-source-module="(lib &quot;data/scribblings/data.scrbl&quot;)" x-source-pkg="data-doc" x-part-tag="&quot;More_Enumeration_Operations&quot;">11.4<tt>&nbsp;</tt><a name="(part._.More_.Enumeration_.Operations)"></a><a name="(mod-path._data/enumerate/lib)"></a>More Enumeration Operations</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left" colspan="2"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._data%2Fenumerate%2Flib%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">data/enumerate/lib</span></a><span class="RktPn">)</span></td></tr><tr><td align="left">&nbsp;</td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">data-enumerate-lib</span></span></td></tr></table></p><p>The <span class="RktSym">data/enumerate/lib</span> extends <span class="RktSym">data/enumerate</span> with a bunch of
additional ways to build enumerations, some utility functions, and a bunch of pre-built
enumerations.</p><h5 x-source-module="(lib &quot;data/scribblings/data.scrbl&quot;)" x-source-pkg="data-doc" x-part-tag="&quot;More_Enumeration_Constructors&quot;">11.4.1<tt>&nbsp;</tt><a name="(part._.More_.Enumeration_.Constructors)"></a>More Enumeration Constructors</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><table cellspacing="0" cellpadding="0" class="RktBlk RForeground"><tr><td><span class="RktPn">(</span><a name="(form._((lib._data/enumerate/lib..rkt)._cons/de))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28form._%28%28lib._data%2Fenumerate%2Flib..rkt%29._cons%2Fde%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">cons/de</a></span></span><span class="hspace">&nbsp;</span><span class="RktPn">[</span><span class="RktVar">car-id</span><span class="hspace">&nbsp;</span><span class="RktVar">car-enumeration-expr</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktVar">cdr-id</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktVar">car-id</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVar">cdr-enumeration-expr</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVar">cons/de-option</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._data%2Fenumerate%2Flib..rkt%29._cons%2Fde%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">cons/de</a></span><span class="hspace">&nbsp;</span><span class="RktPn">[</span><span class="RktVar">car-id</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktVar">cdr-id</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVar">car-enumeration-expr</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktVar">cdr-id</span><span class="hspace">&nbsp;</span><span class="RktVar">cdr-enumeration-expr</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVar">cons/de-option</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">&nbsp;</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">cons/de-option</span></td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="RktPn">#:dep-expression-finite?</span><span class="hspace">&nbsp;</span><span class="RktVar">expr</span><span class="hspace">&nbsp;</span><span class="RktVar">cons/de-option</span></td></tr><tr><td align="right" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="RktPn">#:flat?</span><span class="hspace">&nbsp;</span><span class="RktVar">expr</span><span class="hspace">&nbsp;</span><span class="RktVar">cons/de-option</span></td></tr><tr><td align="right" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="RktPn">#:one-way?</span><span class="hspace">&nbsp;</span><span class="RktVar">expr</span><span class="hspace">&nbsp;</span><span class="RktVar">cons/de-option</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Constructs an <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of pairs where the first component
              of the pair is drawn from the <span class="RktVar">car-enumeration-expr</span>&rsquo;s
              value and the second is drawn from the <span class="RktVar">cdr-enumeration-expr</span>&rsquo;s
              value.</div></p><p>In the first form, the <span class="RktVar">cdr-enumeration-expr</span> can use <span class="RktVar">car-id</span>, which
is bound to the value of the car position of the pair, mutatis mutandis in the second case.</p><p>If <span class="RktPn">#:dep-expression-finite?</span> keyword and expression are present, then the
value of the dependent expression is expected to be an <a href="#%28tech._infinite._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">infinite enumeration</span></a>
if the expression evaluates to <span class="RktVal">#f</span> and a finite enumeration otherwise. If
the keyword is not present, then the dependent expressions are expected to always
produce infinite enumerations.</p><p>If <span class="RktPn">#:flat?</span> is present and evaluates to a true value, then the
value of both sub-expressions are expected to be <a href="#%28tech._flat._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">flat enumerations</span></a>
and if it evaluates to <span class="RktVal">#f</span>, then the enumerations must not be <a href="#%28tech._flat._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">flat enumerations</span></a>.
If the keyword is not present, then the dependent expressions are expected to always
produce <a href="#%28tech._flat._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">flat enumerations</span></a>.</p><p>If <span class="RktPn">#:one-way?</span> is present and evaluates to a true value, then the
result enumeration is a <a href="#%28tech._one._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">one way enumeration</span></a></p><p>The dependent expressions are expected to always produce <a href="#%28tech._two._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">two way enumerations</span></a>
if the non-dependent expression is a <a href="#%28tech._two._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">two way enumeration</span></a> and the dependent
the dependent expressions are expected to always produce <a href="#%28tech._one._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">one way enumerations</span></a>
if the non-dependent expression is a <a href="#%28tech._one._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">one way enumeration</span></a>.</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">ordered-pair/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._data%2Fenumerate%2Flib..rkt%29._cons%2Fde%29%29" class="RktStxLink" data-pltdoc="x">cons/de</a></span><span class="hspace">&nbsp;</span><span class="RktPn">[</span><span class="RktSym">hd</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></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;</span><span class="RktPn">[</span><span class="RktSym">tl</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">hd</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._nat%2B%2Fe%29%29" class="RktValLink" data-pltdoc="x">nat+/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="hspace">&nbsp;</span><span class="RktSym">hd</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym">ordered-pair/e</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktRes">'((0 . 1)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 . 2)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 . 2)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 . 3)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 . 3)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 . 4)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(2 . 3)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(2 . 4)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(2 . 5)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 . 4))</span></p></td></tr></table></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._data/enumerate/lib..rkt)._flip-dep/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._flip-dep%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">flip-dep/e</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">e</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">f</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">#:f-range-finite?</span><span class="hspace">&nbsp;</span><span class="RktVar">f-range-finite?</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">#:flat?</span><span class="hspace">&nbsp;</span><span class="RktVar">flat?</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">#:one-way?</span><span class="hspace">&nbsp;</span><span class="RktVar">one-way?</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</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">f</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-contract%29%29" class="RktValLink" data-pltdoc="x">enum-contract</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktVar">f-range-finite?</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktVar">one-way?</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._one-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">one-way-enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktVar">flat?</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._not%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">not/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">f-range-finite?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">flat?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktVal">#t</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">one-way?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._one-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">one-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Constructs an <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of pairs like the second case of <span class="RktSym"><a href="#%28form._%28%28lib._data%2Fenumerate%2Flib..rkt%29._cons%2Fde%29%29" class="RktStxLink" data-pltdoc="x">cons/de</a></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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">flip-dep/e-ordered-pair/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._flip-dep%2Fe%29%29" class="RktValLink" data-pltdoc="x">flip-dep/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></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;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">tl</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._below%2Fe%29%29" class="RktValLink" data-pltdoc="x">below/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym">tl</span><span class="RktPn">)</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;&nbsp;</span><span class="RktPn">#:f-range-finite?</span><span class="hspace">&nbsp;</span><span class="RktVal">#t</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym">flip-dep/e-ordered-pair/e</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktRes">'((0 . 1)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 . 2)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 . 2)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 . 3)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 . 3)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(2 . 3)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 . 4)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 . 4)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(2 . 4)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(3 . 4))</span></p></td></tr></table></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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate/lib..rkt)._cons/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._cons%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">cons/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">e1</span><span class="hspace">&nbsp;</span><span class="RktVar">e2</span><span class="hspace">&nbsp;</span>[<span class="RktPn">#:ordering</span><span class="hspace">&nbsp;</span><span class="RktVar">ordering</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">ordering</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">diagonal</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">square</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">square</span></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of pairs of the values from <span class="RktVar">e1</span> and
<span class="RktVar">e2</span>. Like <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span>, the <span class="RktVar">ordering</span> argument
controls how the resting elements appear.</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._cons%2Fe%29%29" class="RktValLink" data-pltdoc="x">cons/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._take%2Fe%29%29" class="RktValLink" data-pltdoc="x">take/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">4</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._take%2Fe%29%29" class="RktValLink" data-pltdoc="x">take/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'((0 . 0) (1 . 0) (2 . 0) (3 . 0) (0 . 1))</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._cons%2Fe%29%29" class="RktValLink" data-pltdoc="x">cons/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._take%2Fe%29%29" class="RktValLink" data-pltdoc="x">take/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'((0 . 0) (0 . 1) (0 . 2) (0 . 3) (0 . 4))</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._cons%2Fe%29%29" class="RktValLink" data-pltdoc="x">cons/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._take%2Fe%29%29" class="RktValLink" data-pltdoc="x">take/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">4</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'((0 . 0) (1 . 0) (2 . 0) (3 . 0) (0 . 1))</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._cons%2Fe%29%29" class="RktValLink" data-pltdoc="x">cons/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'((0 . 0) (0 . 1) (1 . 0) (1 . 1) (0 . 2))</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._data/enumerate/lib..rkt)._listof/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._listof%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">listof/e</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">e</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">#:simple-recursive?</span><span class="hspace">&nbsp;</span><span class="RktVar">simple-recursive?</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr></table></blockquote></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">e</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktVar">simple-recursive?</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">simple-recursive?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of lists of values
enumerated by <span class="RktVar">e</span>.</div></p><p>If <span class="RktVar">simple-recursive?</span> is <span class="RktVal">#f</span>, then the enumeration
is constructed by first choosing a length and then using <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span>
to build lists of that length. If not, it builds a recursive enumeration
using <span class="RktSym"><a href="#%28form._%28%28lib._data%2Fenumerate%2Flib..rkt%29._delay%2Fe%29%29" class="RktStxLink" data-pltdoc="x">delay/e</a></span>. The second option (which is the default) method is significantly
more efficient when calling <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span> with large numbers, but
it also has much shorter lists near the beginning of the enumeration.</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._listof%2Fe%29%29" class="RktValLink" data-pltdoc="x">listof/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">#:simple-recursive?</span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(() (0) (1) (0 0) (0 1) (2) (1 0) (0 0 0) (0 0 1) (0 1 0))</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._listof%2Fe%29%29" class="RktValLink" data-pltdoc="x">listof/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(() (0) (0 0) (1) (1 0) (0 0 0) (1 0 0) (2) (2 0) (2 0 0))</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._listof%2Fe%29%29" class="RktValLink" data-pltdoc="x">listof/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">#:simple-recursive?</span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="hspace">&nbsp;</span><span class="RktVal">4</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktVal">6</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">2929082647</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._listof%2Fe%29%29" class="RktValLink" data-pltdoc="x">listof/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="hspace">&nbsp;</span><span class="RktVal">4</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktVal">6</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">19656567028457999961819135393421096124461042490733963</span></p></td></tr></table></blockquote></div></p><p>This plot shows some statistics for the first 500
items in each enumeration. The first plot shows how many different lengths
each encounters. The red circles are when the <span class="RktPn">#:simple-recursive?</span>
argument is <span class="RktVal">#t</span> and the blue stars are when that argument is
<span class="RktVal">#f</span>.</p><p><img style="vertical-align: 0px; margin: -3px -3px -3px -3px;" src="pict_4.png" alt="image" width="406" height="406"/></p><p>This plot shows the different values, but this time on a log scale. As you can
see, zero appears much more frequently when the <span class="RktPn">#:simple-recursive?</span>
argument is <span class="RktVal">#f</span>.</p><p><img style="vertical-align: 0px; margin: -3px -3px -3px -3px;" src="pict_5.png" alt="image" width="406" height="406"/></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._data/enumerate/lib..rkt)._non-empty-listof/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._non-empty-listof%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">non-empty-listof/e</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">e</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">#:simple-recursive?</span><span class="hspace">&nbsp;</span><span class="RktVar">simple-recursive?</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="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</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">e</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktVar">simple-recursive?</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">simple-recursive?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._listof%2Fe%29%29" class="RktValLink" data-pltdoc="x">listof/e</a></span>, but without the empty list.</div></p><p><div class="SIntrapara">Example:</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._non-empty-listof%2Fe%29%29" class="RktValLink" data-pltdoc="x">non-empty-listof/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'((0) (0 0) (1) (1 0) (0 0 0))</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate/lib..rkt)._listof-n/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._listof-n%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">listof-n/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span><span class="RktVar">n</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></p></blockquote></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">e</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktSym">simple-recursive?</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">n</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"><p><div class="SIntrapara">Example:</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._listof-n%2Fe%29%29" class="RktValLink" data-pltdoc="x">listof-n/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktRes">'((0 0 0)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 0 1)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 1 0)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 1 1)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 0 0)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 0 1)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 1 0)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 1 1)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(0 0 2)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(1 0 2))</span></p></td></tr></table></td></tr></table></blockquote></div></p></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>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._data/enumerate/lib..rkt)._delay/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28form._%28%28lib._data%2Fenumerate%2Flib..rkt%29._delay%2Fe%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">delay/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">enum-expression</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="hspace">&nbsp;</span><span class="RktVar">keyword-options</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="stt">&nbsp;</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">keyword-options</span></td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="RktPn">#:count</span><span class="hspace">&nbsp;</span><span class="RktVar">count-expression</span><span class="hspace">&nbsp;</span><span class="RktVar">keyword-options</span></td></tr><tr><td align="right" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="RktPn">#:two-way-enum?</span><span class="hspace">&nbsp;</span><span class="RktVar">two-way-boolean-expression</span><span class="hspace">&nbsp;</span><span class="RktVar">keyword-options</span></td></tr><tr><td align="right" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="RktPn">#:flat-enum?</span><span class="hspace">&nbsp;</span><span class="RktVar">flat-boolean-expression</span><span class="hspace">&nbsp;</span><span class="RktVar">keyword-options</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Returns an <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> immediately, without
evaluating the <span class="RktVar">enum-expression</span>s. When the result
enumeration is inspected (directly or indirectly) via
<span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span>, or
<span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-contract%29%29" class="RktValLink" data-pltdoc="x">enum-contract</a></span>, the <span class="RktVar">enum-expression</span>s are
evaluated and the value of the last one is cached. The value is then used as
the enumeration.</div></p><p>If the <span class="RktVar">count-expression</span> is not supplied or if it evaluates to <span class="RktVal">+inf.0</span>,
 the resulting enumeration is a <a href="#%28tech._infinite._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">infinite enumeration</span></a>. Otherwise the
 expression must evaluate to an <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span> and the resulting
 enumeration is a <a href="#%28tech._finite._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">finite enumeration</span></a> of the given count.</p><p>If <span class="RktVar">two-way-boolean-expression</span> is supplied and it evaluates to anything
 other than <span class="RktVal">#f</span>, the resulting
 enumeration must be a <a href="#%28tech._two._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">two way enumeration</span></a>; otherwise it must be a
 <a href="#%28tech._one._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">one way enumeration</span></a>.</p><p>If <span class="RktVar">flat-boolean-expression</span> is supplied and it evaluates to anything
 other than <span class="RktVal">#f</span>, the resulting
 enumeration must be a <a href="#%28tech._flat._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">flat enumeration</span></a>; otherwise it must not be.</p><p><div class="SIntrapara">This expression form is useful for building recursive enumerations.
 </div><div class="SIntrapara"><p><div class="SIntrapara">Example:</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._letrec%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">letrec</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">bt/e</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._data%2Fenumerate%2Flib..rkt%29._delay%2Fe%29%29" class="RktStxLink" data-pltdoc="x">delay/e</a></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;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._or%2Fe%29%29" class="RktValLink" data-pltdoc="x">or/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._single%2Fe%29%29" class="RktValLink" data-pltdoc="x">single/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym">bt/e</span><span class="hspace">&nbsp;</span><span class="RktSym">bt/e</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym">bt/e</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'(#f (#f #f) (#f (#f #f)) ((#f #f) #f) ((#f #f) (#f #f)))</span></p></td></tr></table></blockquote></div></p></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate/lib..rkt)._take/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._take%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">take/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span><span class="RktVar">n</span><span class="hspace">&nbsp;</span><span class="RktPn">#:contract</span><span class="hspace">&nbsp;</span><span class="RktVar">contract</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</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">n</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._integer-in%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-count%29%29" class="RktValLink" data-pltdoc="x">enum-count</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">contract</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._and%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">and</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-contract%29%29" class="RktValLink" data-pltdoc="x">enum-contract</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3c%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">&lt;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVar">n</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">Identical to <span class="RktVar">e</span> but only includes the first <span class="RktVar">n</span> values.</div></p><p>If the <span class="RktVar">contract</span> argument is not supplied, then <span class="RktVar">e</span> must
be both a <a href="#%28tech._two._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">two way enumeration</span></a> and a <a href="#%28tech._flat._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">flat enumeration</span></a>.</p><p><div class="SIntrapara">Example:</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._take%2Fe%29%29" class="RktValLink" data-pltdoc="x">take/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 1 2 3 4)</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate/lib..rkt)._slice/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._slice%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">slice/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span><span class="RktVar">lo</span><span class="hspace">&nbsp;</span><span class="RktVar">hi</span><span class="hspace">&nbsp;</span><span class="RktPn">#:contract</span><span class="hspace">&nbsp;</span><span class="RktVar">contract</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</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">lo</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._integer-in%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-count%29%29" class="RktValLink" data-pltdoc="x">enum-count</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3c%7E3d%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">&lt;=/c</a></span><span class="hspace">&nbsp;</span><span class="RktVar">hi</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">hi</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._integer-in%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-count%29%29" class="RktValLink" data-pltdoc="x">enum-count</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">contract</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-contract%29%29" class="RktValLink" data-pltdoc="x">enum-contract</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3c%7E3d%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">&lt;=</a></span><span class="hspace">&nbsp;</span><span class="RktVar">lo</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3c%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">&lt;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVar">hi</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">Identical to <span class="RktVar">e</span> but only includes the values between
<span class="RktVar">lo</span> (inclusive) and <span class="RktVar">hi</span> (exclusive).</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._slice%2Fe%29%29" class="RktValLink" data-pltdoc="x">slice/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(5 6 7 8 9)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._slice%2Fe%29%29" class="RktValLink" data-pltdoc="x">slice/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">20</span><span class="hspace">&nbsp;</span><span class="RktVal">20</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#&lt;empty-enum&gt;</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate/lib..rkt)._fin/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._fin%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">fin/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">x</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">x</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Builds an <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> containing each <span class="RktVar">x</span>, in the order
given.</div></p><p>If there are multiple arguments, then they must all be
distinct; numbers except for <span class="RktVal">+nan.0</span> and <span class="RktVal">+nan.f</span> are
compared using <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3d%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">=</a></span> and all others are compared using
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._equal%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">equal?</a></span>).</p><p>If some other
equality function is appropriate, use <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._map%2Fe%29%29" class="RktValLink" data-pltdoc="x">map/e</a></span>
with <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._below%2Fe%29%29" class="RktValLink" data-pltdoc="x">below/e</a></span><span class="stt"> </span><span class="RktSym">n</span><span class="RktPn">)</span> as the first argument to explicitly specify
how to differentiate the elements of the
enumeration.</p><p><div class="SIntrapara">If all of the arguments match the contract
</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=characters.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._char%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">char?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=keywords.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._keyword%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">keyword?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._null%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">null?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._number%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">number?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">then the result is a <a href="#%28tech._two._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">two way enumeration</span></a>, otherwise it
is a <a href="#%28tech._one._way._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">one way enumeration</span></a>.</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._fin%2Fe%29%29" class="RktValLink" data-pltdoc="x">fin/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"Brian"</span><span class="hspace">&nbsp;</span><span class="RktVal">"Jenny"</span><span class="hspace">&nbsp;</span><span class="RktVal">"Ki"</span><span class="hspace">&nbsp;</span><span class="RktVal">"Ted"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'("Brian" "Jenny" "Ki" "Ted")</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._fin%2Fe%29%29" class="RktValLink" data-pltdoc="x">fin/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktVal">7</span><span class="hspace">&nbsp;</span><span class="RktVal">9</span><span class="hspace">&nbsp;</span><span class="RktVal">11</span><span class="hspace">&nbsp;</span><span class="RktVal">13</span><span class="hspace">&nbsp;</span><span class="RktVal">15</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(1 3 5 7 9 11 13 15)</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate/lib..rkt)._single/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._single%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">single/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span><span class="RktPn">#:equal?</span><span class="hspace">&nbsp;</span><span class="RktVar">same?</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span><span class="RktPn">)</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">same?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._equal%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">equal?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns an enumeration of count one containing only <span class="RktVar">v</span>.</div></p><p>It uses <span class="RktVar">same?</span> to build the contract in
the enumeration, always passing <span class="RktVar">v</span> as the first
argument to <span class="RktVar">same?</span>.</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._single%2Fe%29%29" class="RktValLink" data-pltdoc="x">single/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">12345</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(12345)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._single%2Fe%29%29" class="RktValLink" data-pltdoc="x">single/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(#&lt;procedure&gt;)</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate/lib..rkt)._range/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._range%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">range/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">lo</span><span class="hspace">&nbsp;</span><span class="RktVar">hi</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></p></blockquote></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">lo</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal"><span class="nobreak">-i</span>nf.0</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3c%7E3d%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">&lt;=/c</a></span><span class="hspace">&nbsp;</span><span class="RktVar">hi</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hi</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">+inf.0</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of the exact integers between <span class="RktVar">lo</span> and <span class="RktVar">hi</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._range%2Fe%29%29" class="RktValLink" data-pltdoc="x">range/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="hspace">&nbsp;</span><span class="RktVal">20</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(10 11 12 13 14 15 16 17 18 19 20)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._range%2Fe%29%29" class="RktValLink" data-pltdoc="x">range/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(10)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._range%2Fe%29%29" class="RktValLink" data-pltdoc="x">range/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal"><span class="nobreak">-i</span>nf.0</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 -1 -2 -3 -4 -5 -6 -7 -8 -9)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._range%2Fe%29%29" class="RktValLink" data-pltdoc="x">range/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal"><span class="nobreak">-i</span>nf.0</span><span class="hspace">&nbsp;</span><span class="RktVal">+inf.0</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 1 -1 2 -2 3 -3 4 -4 5)</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate/lib..rkt)._nat+/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._nat%2B%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">nat+/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">lo</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">lo</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of natural numbers larger than <span class="RktVar">lo</span>.</div></p><p><div class="SIntrapara">Example:</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._nat%2B%2Fe%29%29" class="RktValLink" data-pltdoc="x">nat+/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">42</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(42 43 44 45 46)</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate/lib..rkt)._vector/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._vector%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">vector/e</a></span></span><span class="hspace">&nbsp;</span>[<span class="RktPn">#:ordering</span><span class="hspace">&nbsp;</span><span class="RktVar">ordering</span>]<span class="hspace">&nbsp;</span><span class="RktVar">e</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">ordering</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">diagonal</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">square</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">square</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of vectors of values enumerated by the
<span class="RktVar">e</span>.</div></p><p>The <span class="RktVar">ordering</span> argument is the same as the one to <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._list%2Fe%29%29" class="RktValLink" data-pltdoc="x">list/e</a></span>.</p><p><div class="SIntrapara">Example:</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._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._vector%2Fe%29%29" class="RktValLink" data-pltdoc="x">vector/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._fin%2Fe%29%29" class="RktValLink" data-pltdoc="x">fin/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"Brian"</span><span class="hspace">&nbsp;</span><span class="RktVal">"Jenny"</span><span class="hspace">&nbsp;</span><span class="RktVal">"Ki"</span><span class="hspace">&nbsp;</span><span class="RktVal">"Ted"</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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._fin%2Fe%29%29" class="RktValLink" data-pltdoc="x">fin/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"Terra"</span><span class="hspace">&nbsp;</span><span class="RktVal">"Locke"</span><span class="hspace">&nbsp;</span><span class="RktVal">"Edgar"</span><span class="hspace">&nbsp;</span><span class="RktVal">"Mash"</span><span class="RktPn">)</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="RktVal">5</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktRes">'(#("Brian" 0 "Terra")</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">#("Jenny" 0 "Terra")</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">#("Ki" 0 "Terra")</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">#("Ted" 0 "Terra")</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">#("Brian" 0 "Locke"))</span></p></td></tr></table></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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate/lib..rkt)._permutations-of-n/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._permutations-of-n%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">permutations-of-n/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">n</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">n</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns an <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of the permutations of the natural
numbers smaller than <span class="RktVar">n</span>.</div></p><p><div class="SIntrapara">Example:</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._permutations-of-n%2Fe%29%29" class="RktValLink" data-pltdoc="x">permutations-of-n/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'((0 1 2) (0 2 1) (1 0 2) (1 2 0) (2 0 1) (2 1 0))</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate/lib..rkt)._permutations/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._permutations%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">permutations/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">l</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">l</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns an <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of the permutations of <span class="RktVar">l</span>.</div></p><p><div class="SIntrapara">Example:</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._permutations%2Fe%29%29" class="RktValLink" data-pltdoc="x">permutations/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">Brian</span><span class="hspace">&nbsp;</span><span class="RktVal">Jenny</span><span class="hspace">&nbsp;</span><span class="RktVal">Ted</span><span class="hspace">&nbsp;</span><span class="RktVal">Ki</span><span class="RktVal">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktRes">'((Brian Jenny Ted Ki)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Brian Jenny Ki Ted)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Brian Ted Jenny Ki)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Brian Ted Ki Jenny)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Brian Ki Jenny Ted)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Brian Ki Ted Jenny)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Jenny Brian Ted Ki)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Jenny Brian Ki Ted)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Jenny Ted Brian Ki)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Jenny Ted Ki Brian)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Jenny Ki Brian Ted)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Jenny Ki Ted Brian)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Ted Brian Jenny Ki)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Ted Brian Ki Jenny)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Ted Jenny Brian Ki)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Ted Jenny Ki Brian)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Ted Ki Brian Jenny)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Ted Ki Jenny Brian)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Ki Brian Jenny Ted)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Ki Brian Ted Jenny)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Ki Jenny Brian Ted)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Ki Jenny Ted Brian)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Ki Ted Brian Jenny)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">(Ki Ted Jenny Brian))</span></p></td></tr></table></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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate/lib..rkt)._set/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._set%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">set/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns an <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of finite sets of values from <span class="RktVar">e</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._set%2Fe%29%29" class="RktValLink" data-pltdoc="x">set/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._fin%2Fe%29%29" class="RktValLink" data-pltdoc="x">fin/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"Brian"</span><span class="hspace">&nbsp;</span><span class="RktVal">"Jenny"</span><span class="hspace">&nbsp;</span><span class="RktVal">"Ki"</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktRes">(list</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set "Brian")</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set "Jenny")</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set "Brian" "Jenny")</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set "Ki")</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set "Brian" "Ki")</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set "Ki" "Jenny")</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set "Brian" "Ki" "Jenny"))</span></p></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._set%2Fe%29%29" class="RktValLink" data-pltdoc="x">set/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktRes">(list</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set 0)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set 1)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set 1 0)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set 2)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set 2 0)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set 1 2)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set 1 2 0)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set 3)</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;</span><span class="RktRes">(set 3 0))</span></p></td></tr></table></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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate/lib..rkt)._infinite-sequence/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._infinite-sequence%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">infinite-sequence/e</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._one-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">one-way-enum?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns an <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of infinite sequences of elements of
<span class="RktVar">e</span>. If <span class="RktVar">e</span> is an empty enumeration, returns an empty enumeration.</div></p><p>The infinite sequence corresponding to the natural number <span class="RktVar">n</span>
is based on dividing the bits of <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252A%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">*</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="stt"> </span><span class="RktVal">1</span><span class="stt"> </span><span class="RktVar">n</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528lib._racket%252Fmath..rkt%2529._pi%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">pi</a></span><span class="RktPn">)</span> into chunks
of bits where the largest value is <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-count%29%29" class="RktValLink" data-pltdoc="x">enum-count</a></span><span class="stt"> </span><span class="RktVar">e</span><span class="RktPn">)</span>. Since
<span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252A%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">*</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="stt"> </span><span class="RktVal">1</span><span class="stt"> </span><span class="RktVar">n</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528lib._racket%252Fmath..rkt%2529._pi%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">pi</a></span><span class="RktPn">)</span> has infinite digits, there are infinitely
many such chunks. Since <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252A%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">*</a></span> is defined on all naturals, there
are infinitely many such numbers. The generation of the sequence is
efficient in the sense that the digits are generated incrementally
without needing to go deeper than to find the requested value.
The generation of the sequence is inefficient in the sense that
the approximation of <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252A%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">*</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="stt"> </span><span class="RktVal">1</span><span class="stt"> </span><span class="RktVar">n</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528lib._racket%252Fmath..rkt%2529._pi%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">pi</a></span><span class="RktPn">)</span> gets larger and larger
as you go deeper into the sequence.</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">bjtks/e</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._infinite-sequence%2Fe%29%29" class="RktValLink" data-pltdoc="x">infinite-sequence/e</a></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;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._fin%2Fe%29%29" class="RktValLink" data-pltdoc="x">fin/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">Brian</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">Jenny</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">Ted</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">Ki</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=for.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._for%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">for</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._from-nat%29%29" class="RktValLink" data-pltdoc="x">from-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">bjtks/e</span><span class="hspace">&nbsp;</span><span class="RktVal">42</span><span class="RktPn">)</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym">i</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=sequences.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._in-range%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">in-range</a></span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._printf%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">printf</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"~a = ~a\n"</span><span class="hspace">&nbsp;</span><span class="RktSym">i</span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktOut">0 = Ted</span></p></td></tr><tr><td><p><span class="RktOut">1 = Brian</span></p></td></tr><tr><td><p><span class="RktOut">2 = Ted</span></p></td></tr><tr><td><p><span class="RktOut">3 = Jenny</span></p></td></tr><tr><td><p><span class="RktOut">4 = Jenny</span></p></td></tr><tr><td><p><span class="RktOut">5 = Jenny</span></p></td></tr><tr><td><p><span class="RktOut">6 = Ki</span></p></td></tr><tr><td><p><span class="RktOut">7 = Jenny</span></p></td></tr><tr><td><p><span class="RktOut">8 = Ki</span></p></td></tr><tr><td><p><span class="RktOut">9 = Jenny</span></p></td></tr></table></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._data/enumerate/lib..rkt)._hash-traverse/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._hash-traverse%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">hash-traverse/e</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">f</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">xs</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">#:get-contract</span><span class="hspace">&nbsp;</span><span class="RktVar">get-contract</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">f</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">xs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fhash..rkt%2529._hash%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">hash/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">get-contract</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=contract-utilities.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fguts..rkt%2529._contract%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">contract?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Constructs an <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> that simultaneously enumerates each
of the enumerations returned by <span class="RktVar">f</span> applied to each value of
<span class="RktVar">xs</span>.</div></p><p>The <span class="RktVar">get-contract</span> argument is applied to the keys in the
hash and is expected to return the contract for the corresponding
enumeration.</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">hash-traverse-1/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._let%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">let</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">h</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=hashtables.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._hash%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">hash</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"Brian"</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktVal">"Jenny"</span><span class="hspace">&nbsp;</span><span class="RktVal">15</span><span class="hspace">&nbsp;</span><span class="RktVal">"Ted"</span><span class="hspace">&nbsp;</span><span class="RktVal">25</span><span class="hspace">&nbsp;</span><span class="RktVal">"Ki"</span><span class="hspace">&nbsp;</span><span class="RktVal">30</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._hash-traverse%2Fe%29%29" class="RktValLink" data-pltdoc="x">hash-traverse/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">n</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._below%2Fe%29%29" class="RktValLink" data-pltdoc="x">below/e</a></span><span class="hspace">&nbsp;</span><span class="RktSym">n</span><span class="RktPn">)</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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym">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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">#:get-contract</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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3c%7E3d%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">&lt;=/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=hashtables.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._hash-ref%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">hash-ref</a></span><span class="hspace">&nbsp;</span><span class="RktSym">h</span><span class="hspace">&nbsp;</span><span class="RktSym">v</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym">hash-traverse-1/e</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktRes">'(#hash(("Brian" . 0) ("Ki" . 0) ("Ted" . 0) ("Jenny" . 0))</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">#hash(("Brian" . 1) ("Ki" . 0) ("Ted" . 0) ("Jenny" . 0))</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">#hash(("Brian" . 2) ("Ki" . 0) ("Ted" . 0) ("Jenny" . 0))</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">#hash(("Brian" . 3) ("Ki" . 0) ("Ted" . 0) ("Jenny" . 0))</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">#hash(("Brian" . 4) ("Ki" . 0) ("Ted" . 0) ("Jenny" . 0)))</span></p></td></tr></table></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._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">hash-traverse-1/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">'</span><span class="RktVal">#hash</span><span class="RktVal">(</span><span class="RktVal">(</span><span class="RktVal">"Brian"</span><span class="hspace">&nbsp;</span><span class="RktVal">. </span><span class="RktVal">4</span><span class="RktVal">)</span><span class="hspace">&nbsp;</span><span class="RktVal">(</span><span class="RktVal">"Jenny"</span><span class="hspace">&nbsp;</span><span class="RktVal">. </span><span class="RktVal">1</span><span class="RktVal">)</span><span class="hspace">&nbsp;</span><span class="RktVal">(</span><span class="RktVal">"Ted"</span><span class="hspace">&nbsp;</span><span class="RktVal">. </span><span class="RktVal">16</span><span class="RktVal">)</span><span class="hspace">&nbsp;</span><span class="RktVal">(</span><span class="RktVal">"Ki"</span><span class="hspace">&nbsp;</span><span class="RktVal">. </span><span class="RktVal">7</span><span class="RktVal">)</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">36189</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._data/enumerate/lib..rkt)._fold-enum))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._fold-enum%29%29" class="RktValDef RktValLink" data-pltdoc="x">fold-enum</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">f</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">bs</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">#:f-range-finite?</span><span class="hspace">&nbsp;</span><span class="RktVar">f-range-finite?</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr></table></blockquote></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">f</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace">&nbsp;</span><span class="RktVar">f-range-finite?</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">f-range-finite?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">This is like <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Flist..rkt%2529._foldr%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">foldr</a></span>, but <span class="RktVar">f</span> returns
<a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumerations</span></a> of <span class="RktVar">a</span>s and assumes that the accumulator
is initialized to <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">)</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="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">fold-enum-1/e</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._fold-enum%29%29" class="RktValLink" data-pltdoc="x">fold-enum</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">&#955;</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">as</span><span class="hspace">&nbsp;</span><span class="RktSym">b</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;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._below%2Fe%29%29" class="RktValLink" data-pltdoc="x">below/e</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Flist..rkt%2529._foldr%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">foldr</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktSym">as</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">b</span><span class="RktPn">)</span><span class="RktPn">)</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">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="hspace">&nbsp;</span><span class="RktVal">3</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">#:f-range-finite?</span><span class="hspace">&nbsp;</span><span class="RktVal">#t</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym">fold-enum-1/e</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'((0 0 0) (0 0 1) (0 0 2) (0 1 0) (0 1 1))</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym">fold-enum-1/e</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">4</span></p></td></tr></table></blockquote></div></p><h5 x-source-module="(lib &quot;data/scribblings/data.scrbl&quot;)" x-source-pkg="data-doc" x-part-tag="&quot;Enumeration_Utility&quot;">11.4.2<tt>&nbsp;</tt><a name="(part._.Enumeration_.Utility)"></a>Enumeration Utility</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._data/enumerate/lib..rkt)._random-index))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._random-index%29%29" class="RktValDef RktValLink" data-pltdoc="x">random-index</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">e</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">e</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum~3f%29%29" class="RktValLink" data-pltdoc="x">enum?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a random index into <span class="RktVar">e</span>. This works for
 finite and infinite enumerations, regardless of the count
 of the enumeration. For finite enumerations, it picks
 an index uniformly at random using <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=math&amp;rel=base.html%23%2528def._%2528%2528lib._math%252Fbase..rkt%2529._random-natural%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">random-natural</a></span>
 and for infinite enumerations it picks a natural number
 <span class="RktSym">n</span>
 from the geometric distribution and uses that as an
 exponent, picking uniformly at random in the interval
 between <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._expt%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">expt</a></span><span class="stt"> </span><span class="RktVal">2</span><span class="stt"> </span><span class="RktSym">n</span><span class="RktPn">)</span> and <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._expt%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">expt</a></span><span class="stt"> </span><span class="RktVal">2</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="stt"> </span><span class="RktSym">n</span><span class="stt"> </span><span class="RktVal">1</span><span class="RktPn">)</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="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._random-index%29%29" class="RktValLink" data-pltdoc="x">random-index</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._natural%2Fe%29%29" class="RktValLink" data-pltdoc="x">natural/e</a></span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">8858944630574589940391245887340764205993585787227417865</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._random-index%29%29" class="RktValLink" data-pltdoc="x">random-index</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._below%2Fe%29%29" class="RktValLink" data-pltdoc="x">below/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5000000000</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">4836607753</span></p></td></tr></table></blockquote></div></p><h5 x-source-module="(lib &quot;data/scribblings/data.scrbl&quot;)" x-source-pkg="data-doc" x-part-tag="&quot;Pre-built_Enumerations&quot;">11.4.3<tt>&nbsp;</tt><a name="(part._.Pre-built_.Enumerations)"></a>Pre-built Enumerations</h5><p>This section describes enumerations of some common Racket
datatypes.</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>value</p></div></div><p class="RForeground"><a name="(def._((lib._data/enumerate/lib..rkt)._char/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._char%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">char/e</a></span></span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of characters.</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._char%2Fe%29%29" class="RktValLink" data-pltdoc="x">char/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(#\a #\b #\c #\d #\e)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._char%2Fe%29%29" class="RktValLink" data-pltdoc="x">char/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#\&#955;</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">955</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>value</p></div></div><p class="RForeground"><a name="(def._((lib._data/enumerate/lib..rkt)._string/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._string%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">string/e</a></span></span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of strings.</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._string%2Fe%29%29" class="RktValLink" data-pltdoc="x">string/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'("a" "b" "c" "d" "e")</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._string%2Fe%29%29" class="RktValLink" data-pltdoc="x">string/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"racket"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">34015667898221561123161278314514</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>value</p></div></div><p class="RForeground"><a name="(def._((lib._data/enumerate/lib..rkt)._bool/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._bool%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">bool/e</a></span></span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._finite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">finite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of booleans.</div></p><p><div class="SIntrapara">Example:</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._bool%2Fe%29%29" class="RktValLink" data-pltdoc="x">bool/e</a></span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(#t #f)</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>value</p></div></div><p class="RForeground"><a name="(def._((lib._data/enumerate/lib..rkt)._symbol/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._symbol%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">symbol/e</a></span></span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of symbols.</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._symbol%2Fe%29%29" class="RktValLink" data-pltdoc="x">symbol/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(a b c d e)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._symbol%2Fe%29%29" class="RktValLink" data-pltdoc="x">symbol/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">racket/base</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">14463363701250876059548377015002918685315716675027977448257554</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>value</p></div></div><p class="RForeground"><a name="(def._((lib._data/enumerate/lib..rkt)._integer/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._integer%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">integer/e</a></span></span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of the integers.</div></p><p><div class="SIntrapara">Example:</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._integer%2Fe%29%29" class="RktValLink" data-pltdoc="x">integer/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 1 -1 2 -2 3 -3 4 -4 5)</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>value</p></div></div><p class="RForeground"><a name="(def._((lib._data/enumerate/lib..rkt)._flonum/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._flonum%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">flonum/e</a></span></span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._flonum%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">flonum?</a></span>s.</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._flonum%2Fe%29%29" class="RktValLink" data-pltdoc="x">flonum/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktRes">'(+inf.0</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">-inf.0</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">+nan.0</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">0.0</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">4.9406564584125e-324</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">-4.9406564584125e-324</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">9.8813129168249e-324</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">-9.8813129168249e-324</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">1.4821969375237e-323</span></p></td></tr><tr><td><p><span class="RktRes"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktRes">-1.4821969375237e-323)</span></p></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._flonum%2Fe%29%29" class="RktValLink" data-pltdoc="x">flonum/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">1.0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">9214364837600034818</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._to-nat%29%29" class="RktValLink" data-pltdoc="x">to-nat</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._flonum%2Fe%29%29" class="RktValLink" data-pltdoc="x">flonum/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal"><span class="nobreak">-1</span>.0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">9214364837600034819</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>value</p></div></div><p class="RForeground"><a name="(def._((lib._data/enumerate/lib..rkt)._exact-rational/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._exact-rational%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">exact-rational/e</a></span></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._one-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">one-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">An enumeration of rational numbers that
duplicates entries (roughly, it enumerates
all pairs of integers and natural numbers
and then divides them which leads to duplicates).</div></p><p><div class="SIntrapara">Example:</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._exact-rational%2Fe%29%29" class="RktValLink" data-pltdoc="x">exact-rational/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">13</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 1/2 -1/2 1/3 -1/3 1 -1 2/3 -2/3 1/4 -1/4 1/2 -1/2)</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>value</p></div></div><p class="RForeground"><a name="(def._((lib._data/enumerate/lib..rkt)._two-way-real/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._two-way-real%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">two-way-real/e</a></span></span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of reals; it includes
   only <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._integer%2Fe%29%29" class="RktValLink" data-pltdoc="x">integer/e</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._flonum%2Fe%29%29" class="RktValLink" data-pltdoc="x">flonum/e</a></span>.</div></p><p><div class="SIntrapara">Example:</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._two-way-real%2Fe%29%29" class="RktValLink" data-pltdoc="x">two-way-real/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 +inf.0 1 -inf.0 -1)</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>value</p></div></div><p class="RForeground"><a name="(def._((lib._data/enumerate/lib..rkt)._real/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._real%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">real/e</a></span></span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._one-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">one-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of reals; it includes
   <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._exact-rational%2Fe%29%29" class="RktValLink" data-pltdoc="x">exact-rational/e</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._flonum%2Fe%29%29" class="RktValLink" data-pltdoc="x">flonum/e</a></span>.</div></p><p><div class="SIntrapara">Example:</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._real%2Fe%29%29" class="RktValLink" data-pltdoc="x">real/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(+inf.0 0 -inf.0 1/2 +nan.0 -1/2 0.0 1/3 4.9406564584125e-324 -1/3)</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>value</p></div></div><p class="RForeground"><a name="(def._((lib._data/enumerate/lib..rkt)._two-way-number/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._two-way-number%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">two-way-number/e</a></span></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._two-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">two-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of numbers; it includes
   <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._two-way-real%2Fe%29%29" class="RktValLink" data-pltdoc="x">two-way-real/e</a></span> and complex numbers
   made from pairs of those real numbers.</div></p><p><div class="SIntrapara">Example:</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._two-way-number%2Fe%29%29" class="RktValLink" data-pltdoc="x">two-way-number/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(+inf.0 0 +inf.0+inf.0i 1 0+inf.0i -inf.0+inf.0i -inf.0 0+1i +nan.0+inf.0i -1)</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>value</p></div></div><p class="RForeground"><a name="(def._((lib._data/enumerate/lib..rkt)._number/e))"></a><span title="Provided from: data/enumerate/lib | Package: data-enumerate-lib"><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._number%2Fe%29%29" class="RktValDef RktValLink" data-pltdoc="x">number/e</a></span></span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._infinite-enum~3f%29%29" class="RktValLink" data-pltdoc="x">infinite-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._one-way-enum~3f%29%29" class="RktValLink" data-pltdoc="x">one-way-enum?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate..rkt%29._flat-enum~3f%29%29" class="RktValLink" data-pltdoc="x">flat-enum?</a></span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">An <a href="#%28tech._enumeration%29" class="techoutside" data-pltdoc="x"><span class="techinside">enumeration</span></a> of numbers; it
   includes <span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._real%2Fe%29%29" class="RktValLink" data-pltdoc="x">real/e</a></span> and complex
   numbers made from pairs of those real numbers.</div></p><p><div class="SIntrapara">Example:</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="#%28def._%28%28lib._data%2Fenumerate..rkt%29._enum-~3elist%29%29" class="RktValLink" data-pltdoc="x">enum-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._data%2Fenumerate%2Flib..rkt%29._number%2Fe%29%29" class="RktValLink" data-pltdoc="x">number/e</a></span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(+inf.0 +inf.0+inf.0i 0 0 -inf.0+inf.0i 0+1/2i -inf.0 +nan.0+inf.0i 1/2 1/2)</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="union-find.html" title="backward to &quot;10 Union-Find: Sets with only Canonical Elements&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;Data: Data Structures&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<span class="nonavigation">next &rarr;</span></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>