/usr/share/doc/racket/htdp/index.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 | <!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>Implementing HtDP Teachpacks, Libraries, and Customized Teaching Languages</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="../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="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">►</a></td><td></td><td><a href="" class="tocviewselflink" data-pltdoc="x">Implementing Ht<span class="mywbr"> </span>DP Teachpacks, Libraries, and Customized Teaching Languages</a></td></tr></table></div><div class="tocviewsublistonly" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="#%28part._error-guidelines%29" class="tocviewlink" data-pltdoc="x">Error Message Composition Guidelines</a></td></tr><tr><td align="right">2 </td><td><a href="#%28part._error-reporting%29" class="tocviewlink" data-pltdoc="x">Error Reporting Functions</a></td></tr><tr><td align="right">3 </td><td><a href="#%28part._.Testing%29" class="tocviewlink" data-pltdoc="x">Testing</a></td></tr><tr><td align="right">4 </td><td><a href="#%28part._.Ht.D.P_.Languages_as_.Libraries%29" class="tocviewlink" data-pltdoc="x">Ht<span class="mywbr"> </span>DP Languages as Libraries</a></td></tr><tr><td align="right">5 </td><td><a href="#%28part._.Color_and_.Alpha_.Color_.Structs%29" class="tocviewlink" data-pltdoc="x">Color and Alpha Color Structs</a></td></tr></table></div></div></div><div class="tocsub"><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber"></span><a href="#%28part._top%29" class="tocsubseclink" data-pltdoc="x">Implementing Ht<span class="mywbr"> </span>DP Teachpacks, Libraries, and Customized Teaching Languages</a></td></tr><tr><td><span class="tocsublinknumber">1<tt> </tt></span><a href="#%28part._error-guidelines%29" class="tocsubseclink" data-pltdoc="x">Error Message Composition Guidelines</a></td></tr><tr><td><span class="tocsublinknumber">1.1<tt> </tt></span><a href="#%28part._.General_.Guidelines%29" class="tocsubseclink" data-pltdoc="x">General Guidelines</a></td></tr><tr><td><span class="tocsublinknumber">1.2<tt> </tt></span><a href="#%28part._.Message_.Structure_and_.Form%29" class="tocsubseclink" data-pltdoc="x">Message Structure and Form</a></td></tr><tr><td><span class="tocsublinknumber">1.3<tt> </tt></span><a href="#%28part._.Words_.For_.Describing_.Code%29" class="tocsubseclink" data-pltdoc="x">Words For Describing Code</a></td></tr><tr><td><span class="tocsublinknumber">1.4<tt> </tt></span><a href="#%28part._.Words_.For_.Describing_.Runtime_.Behavior%29" class="tocsubseclink" data-pltdoc="x">Words For Describing Runtime Behavior</a></td></tr><tr><td><span class="tocsublinknumber">1.5<tt> </tt></span><a href="#%28part._.Prohibited_.Words%29" class="tocsubseclink" data-pltdoc="x">Prohibited Words</a></td></tr><tr><td><span class="tocsublinknumber">1.6<tt> </tt></span><a href="#%28part._.General_.Vocabulary_.Guidelines%29" class="tocsubseclink" data-pltdoc="x">General Vocabulary Guidelines</a></td></tr><tr><td><span class="tocsublinknumber">1.7<tt> </tt></span><a href="#%28part._.Punctuation%29" class="tocsubseclink" data-pltdoc="x">Punctuation</a></td></tr><tr><td><span class="tocsublinknumber">1.8<tt> </tt></span><a href="#%28part._research%29" class="tocsubseclink" data-pltdoc="x">Supporting Research</a></td></tr><tr><td><span class="tocsublinknumber">2<tt> </tt></span><a href="#%28part._error-reporting%29" class="tocsubseclink" data-pltdoc="x">Error Reporting Functions</a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._check-arg%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>arg</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._check-arity%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>arity</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._check-proc%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>proc</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._check-result%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>result</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._check-list-list%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>list-<wbr></wbr>list</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._check-color%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>color</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._check-fun-res%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>fun-<wbr></wbr>res</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._natural~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">natural?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._find-non%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">find-<wbr></wbr>non</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._check-dependencies%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>dependencies</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._tp-error%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">tp-<wbr></wbr>error</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._tp-exn~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">tp-<wbr></wbr>exn?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._number-~3eord%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">number-<wbr></wbr>>ord</span></span></a></td></tr><tr><td><span class="tocsublinknumber">3<tt> </tt></span><a href="#%28part._.Testing%29" class="tocsubseclink" data-pltdoc="x">Testing</a></td></tr><tr><td><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._build-test-engine%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">build-<wbr></wbr>test-<wbr></wbr>engine</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._builder%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">builder</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._display-results%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">display-<wbr></wbr>results</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._error-handler%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">error-<wbr></wbr>handler</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._exn~3afail~3awish%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> </span>fail:<span class="mywbr"> </span>wish</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._get-test-engine%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">get-<wbr></wbr>test-<wbr></wbr>engine</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._reset-tests%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">reset-<wbr></wbr>tests</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._run-tests%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">run-<wbr></wbr>tests</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._scheme-test-data%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">scheme-<wbr></wbr>test-<wbr></wbr>data</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._signature-test-info~25%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">signature-<wbr></wbr>test-<wbr></wbr>info%</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Ftesting..rkt%29._generate-report%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">generate-<wbr></wbr>report</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4<tt> </tt></span><a href="#%28part._.Ht.D.P_.Languages_as_.Libraries%29" class="tocsubseclink" data-pltdoc="x">Ht<span class="mywbr"> </span>DP Languages as Libraries</a></td></tr><tr><td><span class="tocsublinknumber">4.1<tt> </tt></span><a href="#%28part._.Ht.D.P_.Beginning_.Student%29" class="tocsubseclink" data-pltdoc="x"><span style="font-style: italic">Ht<span class="mywbr"> </span>DP</span> Beginning Student</a></td></tr><tr><td><span class="tocsublinknumber">4.2<tt> </tt></span><a href="#%28part._.Ht.D.P_.Beginning_.Student_with_.Abbreviations%29" class="tocsubseclink" data-pltdoc="x"><span style="font-style: italic">Ht<span class="mywbr"> </span>DP</span> Beginning Student with Abbreviations</a></td></tr><tr><td><span class="tocsublinknumber">4.3<tt> </tt></span><a href="#%28part._.Ht.D.P_.Intermediate_.Student%29" class="tocsubseclink" data-pltdoc="x"><span style="font-style: italic">Ht<span class="mywbr"> </span>DP</span> Intermediate Student</a></td></tr><tr><td><span class="tocsublinknumber">4.4<tt> </tt></span><a href="#%28part._.Ht.D.P_.Intermediate_.Student_with_.Lambda%29" class="tocsubseclink" data-pltdoc="x"><span style="font-style: italic">Ht<span class="mywbr"> </span>DP</span> Intermediate Student with Lambda</a></td></tr><tr><td><span class="tocsublinknumber">4.5<tt> </tt></span><a href="#%28part._.Ht.D.P_.Advanced_.Student%29" class="tocsubseclink" data-pltdoc="x"><span style="font-style: italic">Ht<span class="mywbr"> </span>DP</span> Advanced Student</a></td></tr><tr><td><span class="tocsublinknumber">4.6<tt> </tt></span><a href="#%28part._.Pretty_.Big_.Text__.Legacy_.Language_%29" class="tocsubseclink" data-pltdoc="x">Pretty Big Text (Legacy Language)</a></td></tr><tr><td><span class="tocsublinknumber">4.7<tt> </tt></span><a href="#%28part._.Pretty_.Big__.Legacy_.Language_%29" class="tocsubseclink" data-pltdoc="x">Pretty Big (Legacy Language)</a></td></tr><tr><td><span class="tocsublinknumber">4.8<tt> </tt></span><a href="#%28part._posns_in_.Ht.D.P_.Languages%29" class="tocsubseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">posn</span></span>s in <span style="font-style: italic">Ht<span class="mywbr"> </span>DP</span> Languages</a></td></tr><tr><td><a href="#%28def._%28%28lib._lang%2Fposn..rkt%29._posn%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">posn</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.9<tt> </tt></span><a href="#%28part._.Image_.Equality_in_.Ht.D.P_.Languages%29" class="tocsubseclink" data-pltdoc="x">Image Equality in <span style="font-style: italic">Ht<span class="mywbr"> </span>DP</span> Languages</a></td></tr><tr><td><a href="#%28def._%28%28lib._lang%2Fimageeq..rkt%29._image~3d~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">image=?</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.10<tt> </tt></span><a href="#%28part._.Primitives_in_.Ht.D.P_.Beginner%29" class="tocsubseclink" data-pltdoc="x">Primitives in <span style="font-style: italic">Ht<span class="mywbr"> </span>DP</span> Beginner</a></td></tr><tr><td><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._define-primitive%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>primitive</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._provide-primitive%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">provide-<wbr></wbr>primitive</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._provide-primitives%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">provide-<wbr></wbr>primitives</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._define-higher-order-primitive%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>higher-<wbr></wbr>order-<wbr></wbr>primitive</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._provide-higher-order-primitive%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">provide-<wbr></wbr>higher-<wbr></wbr>order-<wbr></wbr>primitive</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._first-order-~3ehigher-order%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">first-<wbr></wbr>order-<wbr></wbr>>higher-<wbr></wbr>order</span></span></a></td></tr><tr><td><span class="tocsublinknumber">5<tt> </tt></span><a href="#%28part._.Color_and_.Alpha_.Color_.Structs%29" class="tocsubseclink" data-pltdoc="x">Color and Alpha Color Structs</a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Fcolor-structs..rkt%29._color%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">color</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._htdp%2Fcolor-structs..rkt%29._alpha-color%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">alpha-<wbr></wbr>color</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, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <span class="nonavigation">← prev</span> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">up</a> <span class="nonavigation">next →</span></span> </div><h2 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""top""><a name="(part._top)"></a><a name="(part._htdp)"></a>Implementing HtDP Teachpacks, Libraries, and Customized Teaching Languages</h2><p>DrRacket has two different mechanisms for making available additional functions
and functionality to students using the teaching languages.</p><ul><li><p>HtDP Teachpacks are added to a student’s program by clicking on the
“Language” menu and selecting “add Teachpack”. Students can then install a
new Teachpack by clicking “Add Teachpack to List” and choosing the Teachpack
file from the filesystem.</p></li><li><p>HtDP Libraries are brought into the student’s program using a
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=htdp-langs&rel=beginner.html%23%2528form._%2528%2528lib._lang%252Fhtdp-beginner..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span> statement.</p></li></ul><p>Under the hood, HtDP Teachpacks and HtDP Libraries are implemented the same way,
using normal Racket <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&rel=modules.html&version=6.7" class="Sq" data-pltdoc="x">Modules</a>.</p><p><div class="SIntrapara">When implementing such an extension for students, pay a special attention
to two aspects:
</div><div class="SIntrapara"><ol><li><p><span style="font-weight: bold">choice of construct</span>: The teaching languages limit the
expressive power in comparison to plain Racket. One goal is to teach
“design subject to constraints,” and the other one is to help restrict
the set of explanations for student errors. With regard to the first, we
consider it imperative that new teachpacks and libraries avoid features
intended for upper-level students or professionals.</p></li><li><p><span style="font-weight: bold">error messages</span>: The error messages from the teaching languages
go to great length to never confront students messages that uses vocabulary
or phrases outside of the scope of the chosen level. While teachpacks and
libraries can be used at all levels, they should ideally restrict the
vocabulary in error message to the lowest level language in which they are
to be used.</p></li></ol></div></p><p>This manual describes library support for authors of HtDP Teachpacks, libraries,
and customized teaching languages. Use the HtDP
<a href="#%28part._error-reporting%29" data-pltdoc="x">error reporting functions</a> to create error messages
that integrate smoothly with those of the teaching languages. Before composing
new error messages, we recommend you read the <a href="#%28part._error-guidelines%29" data-pltdoc="x">error
message composition guidelines</a> that informed the design of the error messages
of DrRacket’s teaching languages.</p><table cellspacing="0" cellpadding="0"><tr><td><p><span class="hspace"> </span><a href="#%28part._error-guidelines%29" class="toptoclink" data-pltdoc="x">1<span class="hspace"> </span>Error Message Composition Guidelines</a></p></td></tr><tr><td><p><span class="hspace"></span></p></td></tr><tr><td><p><span class="hspace"> </span><a href="#%28part._error-reporting%29" class="toptoclink" data-pltdoc="x">2<span class="hspace"> </span>Error Reporting Functions</a></p></td></tr><tr><td><p><span class="hspace"></span></p></td></tr><tr><td><p><span class="hspace"> </span><a href="#%28part._.Testing%29" class="toptoclink" data-pltdoc="x">3<span class="hspace"> </span>Testing</a></p></td></tr><tr><td><p><span class="hspace"></span></p></td></tr><tr><td><p><span class="hspace"> </span><a href="#%28part._.Ht.D.P_.Languages_as_.Libraries%29" class="toptoclink" data-pltdoc="x">4<span class="hspace"> </span>HtDP Languages as Libraries</a></p></td></tr><tr><td><p><span class="hspace"></span></p></td></tr><tr><td><p><span class="hspace"> </span><a href="#%28part._.Color_and_.Alpha_.Color_.Structs%29" class="toptoclink" data-pltdoc="x">5<span class="hspace"> </span>Color and Alpha Color Structs</a></p></td></tr></table><h3 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""error-guidelines"">1<tt> </tt><a name="(part._error-guidelines)"></a>Error Message Composition Guidelines</h3><p>This section lists some guidelines for writing good error messages for
novices, as informed by <a href="#%28part._research%29" data-pltdoc="x">our research</a>. Please
follow these guidelines when you write code that is intended for
beginners, including libraries and teachpacks. It ensures that error
messages from your code fits messages from the student languages and
from other teachpacks.</p><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""General_Guidelines"">1.1<tt> </tt><a name="(part._.General_.Guidelines)"></a>General Guidelines</h4><ul><li><p>Frustrated students will peer at the error message for clues on
how to proceed. Avoid offering hints, and avoid proposing any
specific modification. Students will follow well-meaning-but-wrong
advice uncritically, if only because they have no reason to doubt
the authoritative voice of the tool.</p></li><li><p>Be concise and clear. Students give up reading error messages
if the text is too long, uses obscure words, or employs difficult
grammar.</p></li></ul><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""Message_Structure_and_Form"">1.2<tt> </tt><a name="(part._.Message_.Structure_and_.Form)"></a>Message Structure and Form</h4><ul><li><p>Start the message with the name of the construct whose
constraint is being violated, followed by a colon.</p></li><li><p>State the constraint that was violated (<span style="font-style: italic">“expected a...”</span>),
then contrast with what was found. For example, <span style="font-style: italic">“this function
expects two arguments, but found only one”</span>. If needed, explain how
what was found fails to satisfy the constraint. Write somewhat
anthropomorphically with an objective voice that is neither friendly
nor antagonistic.</p></li><li><p>If an expression contains multiple errors, report the leftmost
error first. E.g., the error in <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=htdp-langs&rel=beginner.html%23%2528form._%2528%2528lib._lang%252Fhtdp-beginner..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="stt"> </span><span class="RktVal">1</span><span class="stt"> </span><span class="RktVal">2</span><span class="stt"> </span><span class="RktVal">3</span><span class="RktPn">)</span> is
<span style="font-style: italic">“expected the variable name, but found a number”</span>, not
<span style="font-style: italic">“expected 2 parts after define, but found 3”</span>. Before raising
an error about a sub-part of a macro, call
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxtrans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-local-expand-expression%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax-local-expand-expression</a></span> on sub-expressions to its
left, so that such errors are shown first.</p></li><li><p>State the number of parts instead of saying <span style="font-style: italic">“found too many
parts”</span>. Write the code necessary to make plurals agree.</p></li></ul><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""Words_For_Describing_Code"">1.3<tt> </tt><a name="(part._.Words_.For_.Describing_.Code)"></a>Words For Describing Code</h4><p>Use only the following vocabulary words to describe code:</p><p><table cellspacing="0" cellpadding="0" class="boxed"><tr><td><p>function</p></td><td><p>variable</p></td><td><p>argument</p></td><td><p>function body</p></td></tr><tr><td><p>expression</p></td><td><p>part</p></td><td><p>clause</p></td><td><p>top level</p></td></tr><tr><td><p>structure name</p></td><td><p>type name</p></td><td><p>field name</p></td><td><p>binding</p></td></tr></table></p><ul><li><p>Use binding for the square-braced pair in a <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=htdp-langs&rel=intermediate.html%23%2528form._%2528%2528lib._lang%252Fhtdp-intermediate..rkt%2529._let%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">let</a></span>
and similar binding forms.</p></li><li><p>Use ‘argument’ for actual arguments and ‘variable’ for
formal arguments in the header and body of a definition.</p></li><li><p>Use ‘part’ when speaking about an s-expression that is not
an expression, either because it is malformed, because it occurs in
a non-expression position, or because it is a valid piece of syntax
for a macro invocation. A well-formed and well-placed call to a
function, primitive, or macro is not a ‘part’, it is an
‘expression’.</p></li></ul><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""Words_For_Describing_Runtime_Behavior"">1.4<tt> </tt><a name="(part._.Words_.For_.Describing_.Runtime_.Behavior)"></a>Words For Describing Runtime Behavior</h4><p>Use the following vocabulary words to describe how code runs:</p><ul><li><p>When specifying a function’s behavior, say <span style="font-style: italic">“the function
takes ... and produces ...”</span></p></li><li><p>When describing a contract violation, say <span style="font-style: italic">“the function
expects ... but received ...”</span></p></li><li><p>As much as possible, identify expressions and the value they evaluate
to, e.g. <span style="font-style: italic">“the value of <span class="RktPn">(</span><span class="RktSym">f</span><span class="stt"> </span><span class="RktSym">x</span><span class="RktPn">)</span> is 5”</span>. If it is necessary to
mention evaluation order, such as when the context discusses mutable state,
say that the expression <span style="font-style: italic">“evaluates to”</span> a value. Function calls
are a special case of expression. Prefer <span style="font-style: italic">“the function call produces ...”</span>
to <span style="font-style: italic">“the function call evaluates to ...”</span>, except when trying to draw attention to
the evaluation of the arguments.</p></li><li><p><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=htdp-langs&rel=advanced.html%23%2528form._%2528%2528lib._lang%252Fhtdp-advanced..rkt%2529._set%2521%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">set!</a></span> and
<span class="RktSym">set-</span><span class="RktVar">structure-name</span><span class="RktSym">-</span><span class="RktVar">field-name</span><span class="RktSym">!</span>
‘mutate’ variables and structure instances, respectively. Avoid using
the verb ‘sets’ when discussing mutation, and reserve the verbs
‘changes’ and ‘updates’ for functional updates.</p></li></ul><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""Prohibited_Words"">1.5<tt> </tt><a name="(part._.Prohibited_.Words)"></a>Prohibited Words</h4><p>These guidelines use few terms intentionally, emphasizing commonality
among concepts rather than technical precision (which most students do
not appreciate anyway).</p><p><table cellspacing="0" cellpadding="0" class="boxed"><tr><td><p><span style="font-weight: bold">Instead of</span></p></td><td><p><span style="font-weight: bold">Use</span></p></td></tr><tr><td><p>procedure, primitive name, primitive operator, predicate,
selector, constructor</p></td><td><p><span style="font-style: italic">“function”</span>”</p></td></tr><tr><td><p>s-expression</p></td><td><p><span style="font-style: italic">“expression”</span></p></td></tr><tr><td><p>identifier</p></td><td><p><span style="font-style: italic">“argument”</span> or <span style="font-style: italic">“variable”</span>, depending on the use
in the program</p></td></tr><tr><td><p>defined name</p></td><td><p><span style="font-style: italic">“function”</span> or <span style="font-style: italic">“variable”</span></p></td></tr><tr><td><p>sequence</p></td><td><p><span style="font-style: italic">“at least one (in parentheses)”</span></p></td></tr><tr><td><p>function header</p></td><td><p><span style="font-style: italic">“after define”</span>, <span style="font-style: italic">“after the name”</span>,
<span style="font-style: italic">“after the first argument”</span>, ...</p></td></tr><tr><td><p>keyword</p></td><td><p>mention the construct directly by name, such as
<span style="font-style: italic">“expected a variable but found a cond”</span></p></td></tr><tr><td><p>built-in</p></td><td><p>Nothing —<wbr></wbr> avoid this term</p></td></tr><tr><td><p>macro</p></td><td><p>Nothing —<wbr></wbr> avoid this term</p></td></tr></table></p><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""General_Vocabulary_Guidelines"">1.6<tt> </tt><a name="(part._.General_.Vocabulary_.Guidelines)"></a>General Vocabulary Guidelines</h4><ul><li><p>Avoid modifiers that are not necessary to disambiguate. Write
‘variable’ instead of ‘local variable’, ‘defined
variable’, or ‘input variable’. Write ‘clause’ instead of
‘question-answer clause’. If they appear necessary for
disambiguation, try to find some other way to achieve this (and drop
the modifier).</p></li><li><p>When introducing macros with sub-parts, reuse existing
vocabulary words, such as ‘clause’ or ‘binding’ (if
appropriate), or just ‘part’, instead of defining new terms.</p></li><li><p>Use ‘name’ only when describing the syntax of a definition
form. For example, the define form in BSL should say <span style="font-style: italic">“expected
at least one variable after the function name”</span>. Outside of the
definition form, simply use the word ‘function’ rather than
distinguish between (1) a function, (2) the variable that binds the
function, and (3) the name of that variable.</p><p>[Rationale: Students learn this distinction when they learn about
lambda. The first is the lambda implicit in the definition, the
second is the variable introduced by the definition that can appear
as the first argument to <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=htdp-langs&rel=advanced.html%23%2528form._%2528%2528lib._lang%252Fhtdp-advanced..rkt%2529._set%2521%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">set!</a></span>, the third is the particular
sequence of letters. But BSL should avoid this complexity, and
ASL’s error messages should maintain consistency with BSL.]</p></li><li><p>Avoid introducing technical vocabulary, even if well-known to a
mathematician.</p></li></ul><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""Punctuation"">1.7<tt> </tt><a name="(part._.Punctuation)"></a>Punctuation</h4><ul><li><p>Do not use any punctuation beyond those of the normal English
language. Do not write <span class="RktInBG"><span class="hspace"></span><span class="RktIn"><></span><span class="hspace"></span></span> around type names, and do not
write quotes around keywords.</p></li></ul><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""research"">1.8<tt> </tt><a name="(part._research)"></a>Supporting Research</h4><p><div class="SIntrapara">These guidelines arose from a collections of research studies held at
the Worcester Polytechnic Institute, Brown University, and Northeastern
University. Further experiment details and results are described in:
</div><div class="SIntrapara"><ul><li><p><a href="http://www.cs.brown.edu/~sk/Publications/Papers/Published/mfk-mind-lang-novice-inter-error-msg/">Mind Your Language: On Novices’ Interactions with Error
Messages</a></p><p>This paper reports on a series of studies that explore beginning
students’ interactions with the vocabulary and source-expression
highlighting in DrRacket. Our findings demonstrate that the error
message DrRacket’s old error messages significantly failed to convey
information accurately to students.</p></li><li><p><a href="http://www.cs.brown.edu/~sk/Publications/Papers/Published/mfk-measur-effect-error-msg-novice-sigcse/">Measuring the Effectiveness of Error Messages Designed for
Novice Programmers</a></p><p>This paper presents a fine-grained grading rubric for evaluating the
performance of individual error messages. We applied the rubric to
a course worth of student work, which allowed us to characterize
some ways error messages fail.</p></li></ul></div></p><h3 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""error-reporting"">2<tt> </tt><a name="(part._error-reporting)"></a><a name="(mod-path._htdp/error)"></a>Error Reporting Functions</h3><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </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&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._htdp%2Ferror%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">htdp/error</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">htdp-lib</span></span></td></tr></table></p><p>To provide uniform error messages from teachpacks, this module provides several functions:</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._htdp/error..rkt)._check-arg))"></a><span title="Provided from: htdp/error | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._check-arg%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-arg</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span><span class="RktVar">chk</span><span class="hspace"> </span><span class="RktVar">expected</span><span class="hspace"> </span><span class="RktVar">position</span><span class="hspace"> </span><span class="RktVar">given</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">chk</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">expected</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">position</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._positive%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">positive?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._integer%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">integer?</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">given</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Checks an flat-valued argument to function <span class="RktVar">name</span>.
Reports an error for function <span class="RktVar">name</span>
telling students what kind of data is <span class="RktVar">expected</span> at the <span class="RktVar">position</span>-th argument
and displaying what value was actually <span class="RktVar">given</span>,
unless <span class="RktVar">chk</span> is <span class="RktVal">#true</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._htdp/error..rkt)._check-arity))"></a><span title="Provided from: htdp/error | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._check-arity%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-arity</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>[<span class="RktVar">arg#</span>]<span class="hspace"> </span><span class="RktVar">args</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">arg#</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._positive%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">positive?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._integer%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">integer?</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym">?</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">args</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">list?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Checks the arity of a procedure-valued argument to function <span class="RktVar">name</span>.
Reports an error for function <span class="RktVar">name</span>
telling students that <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._length%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">length</a></span><span class="stt"> </span><span class="RktVar">args</span><span class="RktPn">)</span> arguments were provided but
<span class="RktVar">arg#</span> were expected, unless <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3d%2529%2529&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&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._length%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">length</a></span><span class="stt"> </span><span class="RktVar">args</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktVar">arg#</span><span class="RktPn">)</span>
produces <span class="RktVal">#true</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._htdp/error..rkt)._check-proc))"></a><span title="Provided from: htdp/error | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._check-proc%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-proc</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span><span class="RktVar">proc</span><span class="hspace"> </span><span class="RktVar">expected</span><span class="hspace"> </span><span class="RktVar">arg#</span><span class="hspace"> </span><span class="RktVar">arg-err</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">proc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">expected</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._natural~3f%29%29" class="RktValLink" data-pltdoc="x">natural?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">arg#</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._positive%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">positive?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._integer%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">integer?</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">arg-err</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Checks [the properties of] a procedure-valued argument to function <span class="RktVar">name</span>.
Reports an error for function <span class="RktVar">name</span>
telling students that a procedure was expected at position <span class="RktVar">arg#</span>
and that this procedure should be of arity <span class="RktVar">expected</span>,
unless the <span class="RktVar">proc</span> is a function and has the <span class="RktVar">expected</span> arity.
The string <span class="RktVar">arg-err</span> is used to describe the higher-order argument.</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._htdp/error..rkt)._check-result))"></a><span title="Provided from: htdp/error | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._check-result%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-result</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span><span class="RktVar">pred?</span><span class="hspace"> </span><span class="RktVar">kind</span><span class="hspace"> </span><span class="RktVar">returned</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pred?</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">kind</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">returned</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Checks the expected result of a procedure-valued argument.
If the result satisfies <span class="RktVar">pred?</span>, it is returned.
Otherwise, the function reports an error for function <span class="RktVar">name</span>
telling students what <span class="RktVar">kind</span> of value is expected and what the
<span class="RktVar">returned</span> value is. NOTE: if there is more than one
<span class="RktVar">returned</span> value, the function uses the second value. (MF: I forgot
why.)</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._htdp/error..rkt)._check-list-list))"></a><span title="Provided from: htdp/error | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._check-list-list%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-list-list</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span><span class="RktVar">chk</span><span class="hspace"> </span><span class="RktVar">pred?</span><span class="hspace"> </span><span class="RktVar">given</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">chk</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pred?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">given</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Checks a list-of-lists-valued argument to function <span class="RktVar">name</span>.
Reports an error for function <span class="RktVar">name</span> if a list-of-lists contains
a value of the wrong kind—<wbr></wbr>signaled via a string-valued <span class="RktVar">chk</span>.
The <span class="RktVar">given</span> value is the element that went wrong. Rarely used.</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._htdp/error..rkt)._check-color))"></a><span title="Provided from: htdp/error | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._check-color%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-color</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span><span class="RktVar">arg#</span><span class="hspace"> </span><span class="RktVar">given</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">arg#</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._natural~3f%29%29" class="RktValLink" data-pltdoc="x">natural?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">given</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Checks a color-valued argument to function <span class="RktVar">name</span>.
Deprecated. Use <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=teachpack&rel=2htdpimage.html%23%2528def._%2528%2528lib._2htdp%252Fimage..rkt%2529._image-color%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">image-color?</a></span> instead.</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._htdp/error..rkt)._check-fun-res))"></a><span title="Provided from: htdp/error | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._check-fun-res%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-fun-res</a></span></span><span class="hspace"> </span><span class="RktVar">f</span><span class="hspace"> </span><span class="RktVar">pred?</span><span class="hspace"> </span><span class="RktVar">type</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">f</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=procedures.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._procedure%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">procedure?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pred?</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">type</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Creates a callback from <span class="RktVar">f</span> and uses <span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._check-result%29%29" class="RktValLink" data-pltdoc="x">check-result</a></span> to make
sure the result is a piece of data that satisfies <span class="RktVar">pred?</span>,
described as <span class="RktVar">type</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._htdp/error..rkt)._natural~3f))"></a><span title="Provided from: htdp/error | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._natural~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">natural?</a></span></span><span class="hspace"> </span><span class="RktVar">o</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">o</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Determines whether the given value is a natural number.</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._htdp/error..rkt)._find-non))"></a><span title="Provided from: htdp/error | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._find-non%29%29" class="RktValDef RktValLink" data-pltdoc="x">find-non</a></span></span><span class="hspace"> </span><span class="RktVar">pred?</span><span class="hspace"> </span><span class="RktVar">l</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pred?</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">l</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">list?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Find an element of <span class="RktVar">l</span> for which <span class="RktPn">(</span><span class="RktVar">pred?</span><span class="stt"> </span><span class="RktVar">l</span><span class="RktPn">)</span> produces
<span class="RktVal">#true</span>; otherwise return <span class="RktVal">#false</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._htdp/error..rkt)._check-dependencies))"></a><span title="Provided from: htdp/error | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._check-dependencies%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-dependencies</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span><span class="RktVar">chk</span><span class="hspace"> </span><span class="RktVar">fmt</span><span class="hspace"> </span><span class="RktVar">arg</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">chk</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">fmt</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">format-string?</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">arg</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Unless <span class="RktVar">chk</span> is <span class="RktVal">#true</span>, it raises an error called
<span class="RktVar">name</span> whose message is composed from <span class="RktVar">fmt</span> and the
<span class="RktVar">arg</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._htdp/error..rkt)._tp-error))"></a><span title="Provided from: htdp/error | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._tp-error%29%29" class="RktValDef RktValLink" data-pltdoc="x">tp-error</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span><span class="RktVar">fmt</span><span class="hspace"> </span><span class="RktVar">arg</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">fmt</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">format-string?</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">arg</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Signals an <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=exns.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._exn%7E3afail%7E3acontract%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">exn:fail:contract</a></span> from <span class="RktVar">fmt</span> and <span class="RktVar">arg</span>
for a function called <span class="RktVar">name</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._htdp/error..rkt)._tp-exn~3f))"></a><span title="Provided from: htdp/error | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._tp-exn~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">tp-exn?</a></span></span><span class="hspace"> </span><span class="RktVar">o</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">o</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Determine whether the given object is a teachpack exception
MF: Guillaume seems to have deprecated these structures.</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._htdp/error..rkt)._number-~3eord))"></a><span title="Provided from: htdp/error | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._number-~3eord%29%29" class="RktValDef RktValLink" data-pltdoc="x">number->ord</a></span></span><span class="hspace"> </span><span class="RktVar">n</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">n</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ferror..rkt%29._natural~3f%29%29" class="RktValLink" data-pltdoc="x">natural?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Convert a position number into a string, e.g., 1 into “first” and so
on.</div></p><p>MF: These library and its uses needs to be cleaned up.</p><h3 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""Testing"">3<tt> </tt><a name="(part._.Testing)"></a><a name="(mod-path._htdp/testing)"></a>Testing</h3><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </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&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._htdp%2Ftesting%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">htdp/testing</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">htdp-lib</span></span></td></tr></table></p><p>The library re-exports the following identifiers from <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=test-engine&rel=index.html%23%2528mod-path._test-engine%252Fracket-tests%2529&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">test-engine/racket-tests</span></a></p><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._test-engine/racket-tests..rkt)._build-test-engine))"></a><span title="Provided from: htdp/testing | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._build-test-engine%29%29" class="RktValDef RktValLink" data-pltdoc="x">build-test-engine</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._test-engine/racket-tests..rkt)._builder))"></a><span title="Provided from: htdp/testing | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._builder%29%29" class="RktValDef RktValLink" data-pltdoc="x">builder</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._test-engine/racket-tests..rkt)._display-results))"></a><span title="Provided from: htdp/testing | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._display-results%29%29" class="RktValDef RktValLink" data-pltdoc="x">display-results</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._test-engine/racket-tests..rkt)._error-handler))"></a><span title="Provided from: htdp/testing | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._error-handler%29%29" class="RktValDef RktValLink" data-pltdoc="x">error-handler</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._test-engine/racket-tests..rkt)._exn~3afail~3awish))"></a><span title="Provided from: htdp/testing | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._exn~3afail~3awish%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:fail:wish</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._test-engine/racket-tests..rkt)._get-test-engine))"></a><span title="Provided from: htdp/testing | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._get-test-engine%29%29" class="RktValDef RktValLink" data-pltdoc="x">get-test-engine</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._test-engine/racket-tests..rkt)._reset-tests))"></a><span title="Provided from: htdp/testing | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._reset-tests%29%29" class="RktValDef RktValLink" data-pltdoc="x">reset-tests</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._test-engine/racket-tests..rkt)._run-tests))"></a><span title="Provided from: htdp/testing | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._run-tests%29%29" class="RktValDef RktValLink" data-pltdoc="x">run-tests</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._test-engine/racket-tests..rkt)._scheme-test-data))"></a><span title="Provided from: htdp/testing | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._scheme-test-data%29%29" class="RktValDef RktValLink" data-pltdoc="x">scheme-test-data</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._test-engine/racket-tests..rkt)._signature-test-info~25))"></a><span title="Provided from: htdp/testing | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._test-engine%2Fracket-tests..rkt%29._signature-test-info~25%29%29" class="RktValDef RktValLink" data-pltdoc="x">signature-test-info%</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr></table></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._htdp/testing..rkt)._generate-report))"></a><span title="Provided from: htdp/testing | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Ftesting..rkt%29._generate-report%29%29" class="RktValDef RktValLink" data-pltdoc="x">generate-report</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">The same as <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=test-engine&rel=index.html%23%2528form._%2528%2528lib._test-engine%252Fracket-tests..rkt%2529._test%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">test</a></span>.</div></p><h3 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""HtDP_Languages_as_Libraries"">4<tt> </tt><a name="(part._.Ht.D.P_.Languages_as_.Libraries)"></a>HtDP Languages as Libraries</h3><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""HtDP_Beginning_Student"">4.1<tt> </tt><a name="(part._.Ht.D.P_.Beginning_.Student)"></a><a name="(mod-path._lang/htdp-beginner)"></a><span style="font-style: italic">HtDP</span> Beginning Student</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </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&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._lang%2Fhtdp-beginner%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/htdp-beginner</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">htdp-lib</span></span></td></tr></table></p><p>The <a href="#%28mod-path._lang%2Fhtdp-beginner%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/htdp-beginner</span></a> module provides the Beginning
Student Language; see <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=htdp-langs&rel=beginner.html&version=6.7" class="Sq" data-pltdoc="x">Beginning Student</a>.</p><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""HtDP_Beginning_Student_with_Abbreviations"">4.2<tt> </tt><a name="(part._.Ht.D.P_.Beginning_.Student_with_.Abbreviations)"></a><a name="(mod-path._lang/htdp-beginner-abbr)"></a><span style="font-style: italic">HtDP</span> Beginning Student with Abbreviations</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </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&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._lang%2Fhtdp-beginner-abbr%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/htdp-beginner-abbr</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">htdp-lib</span></span></td></tr></table></p><p>The <a href="#%28mod-path._lang%2Fhtdp-beginner-abbr%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/htdp-beginner-abbr</span></a> module provides the
Beginning Student with Abbreviations language; see
<a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=htdp-langs&rel=beginner-abbr.html&version=6.7" class="Sq" data-pltdoc="x">Beginning Student with List Abbreviations</a>.</p><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""HtDP_Intermediate_Student"">4.3<tt> </tt><a name="(part._.Ht.D.P_.Intermediate_.Student)"></a><a name="(mod-path._lang/htdp-intermediate)"></a><span style="font-style: italic">HtDP</span> Intermediate Student</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </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&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._lang%2Fhtdp-intermediate%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/htdp-intermediate</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">htdp-lib</span></span></td></tr></table></p><p>The <a href="#%28mod-path._lang%2Fhtdp-intermediate%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/htdp-intermediate</span></a> module provides the
Intermediate Student language; see
<a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=htdp-langs&rel=intermediate.html&version=6.7" class="Sq" data-pltdoc="x">Intermediate Student</a>.</p><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""HtDP_Intermediate_Student_with_Lambda"">4.4<tt> </tt><a name="(part._.Ht.D.P_.Intermediate_.Student_with_.Lambda)"></a><a name="(mod-path._lang/htdp-intermediate-lambda)"></a><span style="font-style: italic">HtDP</span> Intermediate Student with Lambda</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left" colspan="2"><span class="hspace"> </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&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._lang%2Fhtdp-intermediate-lambda%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/htdp-intermediate-lambda</span></a><span class="RktPn">)</span></td></tr><tr><td align="left"> </td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">htdp-lib</span></span></td></tr></table></p><p>The <a href="#%28mod-path._lang%2Fhtdp-intermediate-lambda%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/htdp-intermediate-lambda</span></a> module provides the
Intermediate Student with Lambda language; see
<a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=htdp-langs&rel=intermediate-lam.html&version=6.7" class="Sq" data-pltdoc="x">Intermediate Student with Lambda</a>.</p><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""HtDP_Advanced_Student"">4.5<tt> </tt><a name="(part._.Ht.D.P_.Advanced_.Student)"></a><a name="(mod-path._lang/htdp-advanced)"></a><span style="font-style: italic">HtDP</span> Advanced Student</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </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&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._lang%2Fhtdp-advanced%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/htdp-advanced</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">htdp-lib</span></span></td></tr></table></p><p>The <a href="#%28mod-path._lang%2Fhtdp-advanced%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/htdp-advanced</span></a> module provides the Advanced
Student language; see <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=htdp-langs&rel=advanced.html&version=6.7" class="Sq" data-pltdoc="x">Advanced Student</a>.</p><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""Pretty_Big_Text__Legacy_Language_"">4.6<tt> </tt><a name="(part._.Pretty_.Big_.Text__.Legacy_.Language_)"></a><a name="(mod-path._lang/plt-pretty-big-text)"></a>Pretty Big Text (Legacy Language)</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </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&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._lang%2Fplt-pretty-big-text%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/plt-pretty-big-text</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">htdp-lib</span></span></td></tr></table></p><p>The <a href="#%28mod-path._lang%2Fplt-pretty-big-text%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/plt-pretty-big-text</span></a> module is similar to the
<span style="font-style: italic">HtDP</span> Advanced Student language, but with more of Racket’s
libraries in legacy form. It provides the bindings of
<a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=mzscheme&rel=index.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">mzscheme</span></a>,
<a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=mzlib&rel=mzlib_etc.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">mzlib/etc</span></a>, <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=mzlib&rel=mzlib_file.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">mzlib/file</span></a>,
<a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=mzlib&rel=mzlib_list.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">mzlib/list</span></a>, <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=mzlib&rel=mzlib_class.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">mzlib/class</span></a>,
<a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=mzlib&rel=mzlib_unit.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">mzlib/unit</span></a>, <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=mzlib&rel=mzlib_include.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">mzlib/include</span></a>,
<a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=mzlib&rel=mzlib_defmacro.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">mzlib/defmacro</span></a>, <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=mzlib&rel=mzlib_pretty.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">mzlib/pretty</span></a>,
<a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=mzlib&rel=mzlib_string.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">mzlib/string</span></a>, <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=mzlib&rel=mzlib_thread.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">mzlib/thread</span></a>,
<a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=mzlib&rel=mzlib_math.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">mzlib/math</span></a>, <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=mzlib&rel=mzlib_match.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">mzlib/match</span></a>,
<a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=mzlib&rel=mzlib_shared.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">mzlib/shared</span></a>, and <a href="#%28mod-path._lang%2Fposn%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/posn</span></a>.</p><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""Pretty_Big__Legacy_Language_"">4.7<tt> </tt><a name="(part._.Pretty_.Big__.Legacy_.Language_)"></a><a name="(mod-path._lang/plt-pretty-big)"></a>Pretty Big (Legacy Language)</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </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&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._lang%2Fplt-pretty-big%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/plt-pretty-big</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">htdp-lib</span></span></td></tr></table></p><p>The <a href="#%28mod-path._lang%2Fplt-pretty-big%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/plt-pretty-big</span></a> module extends
<span class="RktSym">lang/plt-pretty-big-text</span> with <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&rel=index.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket/gui/base</span></a>
and <a href="#%28mod-path._lang%2Fimageeq%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/imageeq</span></a>. This language corresponds to the
<span class="ssansserif">Pretty Big</span> legacy language in DrRacket.</p><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""posns_in_HtDP_Languages"">4.8<tt> </tt><a name="(part._posns_in_.Ht.D.P_.Languages)"></a><a name="(mod-path._lang/posn)"></a><span class="RktSym"><a href="#%28def._%28%28lib._lang%2Fposn..rkt%29._posn%29%29" class="RktValLink" data-pltdoc="x">posn</a></span>s in <span style="font-style: italic">HtDP</span> Languages</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </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&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._lang%2Fposn%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/posn</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">htdp-lib</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><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&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._lang/posn..rkt)._posn-y))"></a><a name="(def._((lib._lang/posn..rkt)._posn-x))"></a><a name="(def._((lib._lang/posn..rkt)._make-posn))"></a><a name="(def._((lib._lang/posn..rkt)._posn~3f))"></a><a name="(def._((lib._lang/posn..rkt)._struct~3aposn))"></a><a name="(def._((lib._lang/posn..rkt)._posn))"></a><span title="Provided from: lang/posn | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._lang%2Fposn..rkt%29._posn%29%29" class="RktValDef RktValLink" data-pltdoc="x">posn</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x</span><span class="stt"> </span><span class="RktSym">y</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._lang%2Fposn..rkt%29._make-posn%29%29" class="RktValLink" data-pltdoc="x">make-posn</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">y</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">The <span class="RktSym"><a href="#%28def._%28%28lib._lang%2Fposn..rkt%29._posn%29%29" class="RktValLink" data-pltdoc="x">posn</a></span> structure type that is also provided by
<span class="RktSym">lang/htdp-beginner</span>.</div></p><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""Image_Equality_in_HtDP_Languages"">4.9<tt> </tt><a name="(part._.Image_.Equality_in_.Ht.D.P_.Languages)"></a><a name="(mod-path._lang/imageeq)"></a>Image Equality in <span style="font-style: italic">HtDP</span> Languages</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </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&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._lang%2Fimageeq%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/imageeq</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">htdp-lib</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._lang/imageeq..rkt)._image~3d~3f))"></a><span title="Provided from: lang/imageeq | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._lang%2Fimageeq..rkt%29._image~3d~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">image=?</a></span></span><span class="hspace"> </span><span class="RktVar">i1</span><span class="hspace"> </span><span class="RktVar">i2</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym">boolean?</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">i1</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=Object_and_Class_Contracts.html%23%2528def._%2528%2528lib._racket%252Fclass..rkt%2529._is-a%7E3f%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">is-a?/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&rel=image-snip_.html&version=6.7" class="RktValLink Sq" data-pltdoc="x">image-snip%</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">i2</span><span class="hspace"> </span>:<span class="hspace"> </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&rel=Object_and_Class_Contracts.html%23%2528def._%2528%2528lib._racket%252Fclass..rkt%2529._is-a%7E3f%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">is-a?/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&rel=image-snip_.html&version=6.7" class="RktValLink Sq" data-pltdoc="x">image-snip%</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">The image-comparison operator that is also provided by
<span class="RktSym">lang/htdp-beginner</span>.</div></p><h4 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""Primitives_in_HtDP_Beginner"">4.10<tt> </tt><a name="(part._.Primitives_in_.Ht.D.P_.Beginner)"></a><a name="(mod-path._lang/prim)"></a>Primitives in <span style="font-style: italic">HtDP</span> Beginner</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </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&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._lang%2Fprim%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/prim</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">htdp-lib</span></span></td></tr></table></p><p>The <a href="#%28mod-path._lang%2Fprim%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">lang/prim</span></a> module several syntactic forms for
use by the implementors of teachpacks, when the teachpack is to be
used with the Beginner Student
Language. In Beginner Student, primitive names (for built-in
procedures) are distinguished from other types of expressions, so that
they can be syntactically restricted to application positions.</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._lang/prim..rkt)._define-primitive))"></a><span title="Provided from: lang/prim | Package: htdp-lib"><span class="RktSym"><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._define-primitive%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define-primitive</a></span></span><span class="hspace"> </span><span class="RktVar">id</span><span class="hspace"> </span><span class="RktVar">proc-id</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Defines <span class="RktVar">id</span> to be a primitive operator whose implementation
is <span class="RktVar">proc-id</span>, and that takes no procedures as
arguments. Normally, <span class="RktVar">id</span> is exported from the teachpack and
<span class="RktVar">proc-id</span> is not.</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._lang/prim..rkt)._provide-primitive))"></a><span title="Provided from: lang/prim | Package: htdp-lib"><span class="RktSym"><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._provide-primitive%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">provide-primitive</a></span></span><span class="hspace"> </span><span class="RktVar">id</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._define-primitive%29%29" class="RktStxLink" data-pltdoc="x">define-primitive</a></span>, but the existing function <span class="RktVar">id</span> is
exported as the primitive operator named <span class="RktVar">id</span>. An alternative
to <span class="RktSym"><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._define-primitive%29%29" class="RktStxLink" data-pltdoc="x">define-primitive</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._lang/prim..rkt)._provide-primitives))"></a><span title="Provided from: lang/prim | Package: htdp-lib"><span class="RktSym"><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._provide-primitives%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">provide-primitives</a></span></span><span class="hspace"> </span><span class="RktVar">id</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Multiple-identifier version of <span class="RktSym"><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._provide-primitive%29%29" class="RktStxLink" data-pltdoc="x">provide-primitive</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._lang/prim..rkt)._define-higher-order-primitive))"></a><span title="Provided from: lang/prim | Package: htdp-lib"><span class="RktSym"><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._define-higher-order-primitive%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define-higher-order-primitive</a></span></span><span class="hspace"> </span><span class="RktVar">id</span><span class="hspace"> </span><span class="RktVar">proc-id</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">arg</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Defines <span class="RktVar">id</span> to be a primitive operator whose implementation is
<span class="RktVar">proc-id</span>. Normally, <span class="RktVar">id</span> is exported from the teachpack and
<span class="RktVar">proc-id</span> is not.</div></p><p>For each non-procedure argument, the corresponding <span class="RktVar">arg</span> should be
an underscore. For each procedure argument, the corresponding <span class="RktVar">arg</span>
should be the usual name of the procedure.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._define-higher-order-primitive%29%29" class="RktStxLink" data-pltdoc="x">define-higher-order-primitive</a></span><span class="hspace"> </span><span class="RktSym">convert-gui</span><span class="hspace"> </span><span class="RktSym">convert-gui/proc</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">f2c</span><span class="RktPn">)</span><span class="RktPn">)</span></p></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>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._lang/prim..rkt)._provide-higher-order-primitive))"></a><span title="Provided from: lang/prim | Package: htdp-lib"><span class="RktSym"><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._provide-higher-order-primitive%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">provide-higher-order-primitive</a></span></span><span class="hspace"> </span><span class="RktVar">id</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">arg</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._define-higher-order-primitive%29%29" class="RktStxLink" data-pltdoc="x">define-higher-order-primitive</a></span>, but the existing function
<span class="RktVar">id</span> is exported as the primitive operator named
<span class="RktVar">id</span>. An alternative to <span class="RktSym"><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._define-higher-order-primitive%29%29" class="RktStxLink" data-pltdoc="x">define-higher-order-primitive</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._lang/prim..rkt)._first-order-~3ehigher-order))"></a><span title="Provided from: lang/prim | Package: htdp-lib"><span class="RktSym"><a href="#%28form._%28%28lib._lang%2Fprim..rkt%29._first-order-~3ehigher-order%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">first-order->higher-order</a></span></span><span class="hspace"> </span><span class="RktVar">expression</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">If <span class="RktVar">expression</span> is the name of a first-order function (either a
primitive or a function defined within Beginner Student), produces the
function as a value; otherwise, the form is equivalent to
<span class="RktVar">expression</span>.</div></p><p>This form is mainly useful for implementing syntactic forms that, like
the application of a higher-order primitive, allow first-order bindings
to be used in an expression position.</p><h3 x-source-module="(lib "htdp/htdp.scrbl")" x-source-pkg="htdp-doc" x-part-tag=""Color_and_Alpha_Color_Structs"">5<tt> </tt><a name="(part._.Color_and_.Alpha_.Color_.Structs)"></a><a name="(mod-path._htdp/color-structs)"></a>Color and Alpha Color Structs</h3><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </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&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._htdp%2Fcolor-structs%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">htdp/color-structs</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">htdp-lib</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><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&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._htdp/color-structs..rkt)._color-blue))"></a><a name="(def._((lib._htdp/color-structs..rkt)._color-green))"></a><a name="(def._((lib._htdp/color-structs..rkt)._color-red))"></a><a name="(def._((lib._htdp/color-structs..rkt)._make-color))"></a><a name="(def._((lib._htdp/color-structs..rkt)._color~3f))"></a><a name="(def._((lib._htdp/color-structs..rkt)._struct~3acolor))"></a><a name="(def._((lib._htdp/color-structs..rkt)._color))"></a><span title="Provided from: htdp/color-structs | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fcolor-structs..rkt%29._color%29%29" class="RktValDef RktValLink" data-pltdoc="x">color</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">red</span><span class="stt"> </span><span class="RktSym">green</span><span class="stt"> </span><span class="RktSym">blue</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fcolor-structs..rkt%29._make-color%29%29" class="RktValLink" data-pltdoc="x">make-color</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">red</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">green</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">blue</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">This is the color sturct that is also exported by <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=teachpack&rel=image.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">htdp/image</span></a>,
but here it is exported via <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._provide%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">provide</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&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct-out%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct-out</a></span><span class="stt"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fcolor-structs..rkt%29._color%29%29" class="RktValLink" data-pltdoc="x">color</a></span><span class="RktPn">)</span><span class="RktPn">)</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>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><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&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._htdp/color-structs..rkt)._alpha-color-blue))"></a><a name="(def._((lib._htdp/color-structs..rkt)._alpha-color-green))"></a><a name="(def._((lib._htdp/color-structs..rkt)._alpha-color-red))"></a><a name="(def._((lib._htdp/color-structs..rkt)._alpha-color-alpha))"></a><a name="(def._((lib._htdp/color-structs..rkt)._make-alpha-color))"></a><a name="(def._((lib._htdp/color-structs..rkt)._alpha-color~3f))"></a><a name="(def._((lib._htdp/color-structs..rkt)._struct~3aalpha-color))"></a><a name="(def._((lib._htdp/color-structs..rkt)._alpha-color))"></a><span title="Provided from: htdp/color-structs | Package: htdp-lib"><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fcolor-structs..rkt%29._alpha-color%29%29" class="RktValDef RktValLink" data-pltdoc="x">alpha-color</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">alpha</span><span class="stt"> </span><span class="RktSym">red</span><span class="stt"> </span><span class="RktSym">green</span><span class="stt"> </span><span class="RktSym">blue</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fcolor-structs..rkt%29._make-alpha-color%29%29" class="RktValLink" data-pltdoc="x">make-alpha-color</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">alpha</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">red</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">green</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">blue</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">This is the color sturct that is also exported by <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=teachpack&rel=image.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">htdp/image</span></a>,
but here it is exported via <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._provide%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">provide</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&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct-out%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct-out</a></span><span class="stt"> </span><span class="RktSym"><a href="#%28def._%28%28lib._htdp%2Fcolor-structs..rkt%29._alpha-color%29%29" class="RktValLink" data-pltdoc="x">alpha-color</a></span><span class="RktPn">)</span><span class="RktPn">)</span>.</div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <span class="nonavigation">← prev</span> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">up</a> <span class="nonavigation">next →</span></span> </div></div></div><div id="contextindicator"> </div></body></html>
|