Skip to content

Commit 011c8ad

Browse files
authored
julie 15/11 (#697)
1 parent ae25659 commit 011c8ad

File tree

14 files changed

+31
-31
lines changed

14 files changed

+31
-31
lines changed

xml/chapter1/section1/subsection4.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ f(5);
651651
additional primitive functions
652652
such as the function
653653
<INDEX><DECLARATION>math_log</DECLARATION> (primitive function)</INDEX>
654-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>math_log</DECLARATION><ECMA>Math.log</ECMA></SUBINDEX></INDEX>
654+
<INDEX><PRIMITIVE/><SUBINDEX><USE>math_log</USE><ECMA>Math.log</ECMA></SUBINDEX></INDEX>
655655
<JAVASCRIPTINLINE>math_log</JAVASCRIPTINLINE>,
656656
which computes the natural logarithm of its argument.<FOOTNOTE>Our
657657
JavaScript environment includes all functions and constants of

xml/chapter1/section2/subsection6.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ expmod(4, 3, 5);
314314
<SPLITINLINE>
315315
<SCHEME>
316316
<INDEX><DECLARATION>random</DECLARATION> (primitive function)</INDEX>
317-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>random</DECLARATION></SUBINDEX></INDEX>
317+
<INDEX><PRIMITIVE/><SUBINDEX><USE>random</USE></SUBINDEX></INDEX>
318318
<SCHEMEINLINE>Random</SCHEMEINLINE>
319319
returns a nonnegative integer less than its integer input. Hence, to obtain
320320
a random number between 1 and <LATEXINLINE>$n-1$</LATEXINLINE>, we call
@@ -323,14 +323,14 @@ expmod(4, 3, 5);
323323
</SCHEME>
324324
<JAVASCRIPT>
325325
<INDEX><DECLARATION>math_random</DECLARATION> (primitive function)</INDEX>
326-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>math_random</DECLARATION><ECMA>Math.random</ECMA></SUBINDEX></INDEX>
326+
<INDEX><PRIMITIVE/><SUBINDEX><USE>math_random</USE><ECMA>Math.random</ECMA></SUBINDEX></INDEX>
327327
which returns a nonnegative number less than 1. Hence, to obtain
328328
a random number between 1 and <LATEXINLINE>$n-1$</LATEXINLINE>, we multiply
329329
the return value of <JAVASCRIPTINLINE>math_random</JAVASCRIPTINLINE> by
330330
<LATEXINLINE>$n-1$</LATEXINLINE>, round down the result with the
331331
primitive function
332332
<INDEX><DECLARATION>math_floor</DECLARATION> (primitive function)</INDEX>
333-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>math_floor</DECLARATION><ECMA>Math.floor</ECMA></SUBINDEX></INDEX>
333+
<INDEX><PRIMITIVE/><SUBINDEX><USE>math_floor</USE><ECMA>Math.floor</ECMA></SUBINDEX></INDEX>
334334
<JAVASCRIPTINLINE>math_floor</JAVASCRIPTINLINE>,
335335
and add 1:
336336
</JAVASCRIPT>
@@ -591,7 +591,7 @@ smallest_divisor(199);
591591
<JAVASCRIPT>
592592
Assume a primitive function
593593
<INDEX><DECLARATION>get_time</DECLARATION> (primitive function)</INDEX>
594-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>get_time</DECLARATION><ECMA>new Date().getTime</ECMA></SUBINDEX></INDEX>
594+
<INDEX><PRIMITIVE/><SUBINDEX><USE>get_time</USE><ECMA>new Date().getTime</ECMA></SUBINDEX></INDEX>
595595
<JAVASCRIPTINLINE>get_time</JAVASCRIPTINLINE> of no arguments
596596
that returns the number of milliseconds that have passed since 00:00:00 UTC
597597
on Thursday, 1 January, 1970.<FOOTNOTE>This date is called the

xml/chapter1/section3/subsection3.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ close_enough(7.7654, 7.7666);
226226
signals an error.<FOOTNOTE>This
227227
can be accomplished using
228228
<INDEX><DECLARATION>error</DECLARATION> (primitive function)</INDEX>
229-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>error</DECLARATION> (\textit{ns})</SUBINDEX></INDEX>
229+
<INDEX><PRIMITIVE/><SUBINDEX><USE>error</USE> (\textit{ns})</SUBINDEX></INDEX>
230230
<SCHEMEINLINE>error</SCHEMEINLINE>,
231231
<SPLITINLINE>
232232
<SCHEME>which takes as
@@ -396,7 +396,7 @@ function fixed_point(f, first_guess) {
396396
<INDEX>fixed point<SUBINDEX><ORDER>cosine</ORDER>of cosine</SUBINDEX></INDEX>
397397
<INDEX>cosine<SUBINDEX>fixed point of</SUBINDEX></INDEX>
398398
<INDEX><DECLARATION>math_cos</DECLARATION> (primitive function)</INDEX>
399-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>math_cos</DECLARATION><ECMA>Math.cos</ECMA></SUBINDEX></INDEX>
399+
<INDEX><PRIMITIVE/><SUBINDEX><USE>math_cos</USE><ECMA>Math.cos</ECMA></SUBINDEX></INDEX>
400400
cosine function, starting with 1 as an initial approximation:<FOOTNOTE>
401401
<SPLIT>
402402
<SCHEME>
@@ -438,7 +438,7 @@ fixed_point(math_cos, 1);
438438
Similarly, we can find a solution to the equation
439439
<LATEXINLINE>$y=\sin y + \cos y$</LATEXINLINE>:
440440
<INDEX><DECLARATION>math_sin</DECLARATION> (primitive function)</INDEX>
441-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>math_sin</DECLARATION><ECMA>Math.sin</ECMA></SUBINDEX></INDEX>
441+
<INDEX><PRIMITIVE/><SUBINDEX><USE>math_sin</USE><ECMA>Math.sin</ECMA></SUBINDEX></INDEX>
442442
<SNIPPET PAGE="69">
443443
<NAME>fixed_example2</NAME>
444444
<REQUIRES>fixed_definition</REQUIRES>

xml/chapter2/section1/subsection1.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ function equal_rat(x, y) {
197197
<SCHEME>primitive procedure</SCHEME>
198198
<JAVASCRIPT>primitive function</JAVASCRIPT>
199199
</SPLITINLINE>
200-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>pair</DECLARATION> (\textit{ns})</SUBINDEX></INDEX>
200+
<INDEX><PRIMITIVE/><SUBINDEX><USE>pair</USE> (\textit{ns})</SUBINDEX></INDEX>
201201
<INDEX><DECLARATION>pair</DECLARATION> (primitive function)</INDEX>
202202
<SPLITINLINE>
203203
<SCHEME>
@@ -217,14 +217,14 @@ function equal_rat(x, y) {
217217
<JAVASCRIPT>functions</JAVASCRIPT>
218218
</SPLITINLINE>
219219
<INDEX><DECLARATION>head</DECLARATION> (primitive function)</INDEX>
220-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>head</DECLARATION> (\textit{ns})</SUBINDEX></INDEX>
220+
<INDEX><PRIMITIVE/><SUBINDEX><USE>head</USE> (\textit{ns})</SUBINDEX></INDEX>
221221
<SPLITINLINE>
222222
<SCHEME><SCHEMEINLINE>car</SCHEMEINLINE></SCHEME>
223223
<JAVASCRIPT><JAVASCRIPTINLINE>head</JAVASCRIPTINLINE></JAVASCRIPT>
224224
</SPLITINLINE>
225225
and
226226
<INDEX><DECLARATION>tail</DECLARATION> (primitive function)</INDEX>
227-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>tail</DECLARATION> (\textit{ns})</SUBINDEX></INDEX>
227+
<INDEX><PRIMITIVE/><SUBINDEX><USE>tail</USE> (\textit{ns})</SUBINDEX></INDEX>
228228
<SPLITINLINE><SCHEME><SCHEMEINLINE>cdr</SCHEMEINLINE></SCHEME><JAVASCRIPT><JAVASCRIPTINLINE>tail</JAVASCRIPTINLINE></JAVASCRIPT></SPLITINLINE>.<SPLITINLINE><SCHEME><FOOTNOTE>The name
229229
<INDEX><DECLARATION>cons</DECLARATION> (primitive function)<SUBINDEX>meaning of the name</SUBINDEX></INDEX>
230230
<SCHEMEINLINE>cons</SCHEMEINLINE> stands for <QUOTE>construct.</QUOTE>
@@ -558,7 +558,7 @@ numer(make_rat(2, 3));
558558
denominator.
559559
We use the primitive function
560560
<INDEX><DECLARATION>stringify</DECLARATION> (primitive function)</INDEX>
561-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>stringify</DECLARATION><ECMA>JSON.stringify</ECMA></SUBINDEX></INDEX>
561+
<INDEX><PRIMITIVE/><SUBINDEX><USE>stringify</USE><ECMA>JSON.stringify</ECMA></SUBINDEX></INDEX>
562562
<JAVASCRIPTINLINE>stringify</JAVASCRIPTINLINE> to turn any value (here
563563
a number) into a string. The operator
564564
<INDEX>string(s)<SUBINDEX>concatenation</SUBINDEX></INDEX>
@@ -619,7 +619,7 @@ print_rat(one_half);
619619
<JAVASCRIPT>functions:<FOOTNOTE>
620620
The primitive function
621621
<INDEX><DECLARATION>display</DECLARATION> (primitive function)</INDEX>
622-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>display</DECLARATION> (\textit{ns})</SUBINDEX></INDEX>
622+
<INDEX><PRIMITIVE/><SUBINDEX><USE>display</USE> (\textit{ns})</SUBINDEX></INDEX>
623623
<JAVASCRIPTINLINE>display</JAVASCRIPTINLINE>
624624
introduced in exercise<SPACE/><REF NAME="ex:search-for-primes"/>
625625
returns its argument, but in the uses of

xml/chapter2/section1/subsection4.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ function add_interval(x, y) {
8989
Alyssa also works out the product of two intervals by finding the
9090
minimum and the maximum of the products of the bounds and using them
9191
as the bounds of the resulting interval.
92-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>math_min</DECLARATION><ECMA>Math.min</ECMA></SUBINDEX></INDEX>
92+
<INDEX><PRIMITIVE/><SUBINDEX><USE>math_min</USE><ECMA>Math.min</ECMA></SUBINDEX></INDEX>
9393
<INDEX><DECLARATION>math_min</DECLARATION> (primitive function)</INDEX>
9494
<SPLITINLINE>
9595
<SCHEME>(<SCHEMEINLINE>Min</SCHEMEINLINE></SCHEME>
9696
<JAVASCRIPT>(The functions <JAVASCRIPTINLINE>math_min</JAVASCRIPTINLINE></JAVASCRIPT>
9797
</SPLITINLINE>
9898
and
9999
<INDEX><DECLARATION>math_max</DECLARATION> (primitive function)</INDEX>
100-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>math_max</DECLARATION><ECMA>Math.max</ECMA></SUBINDEX></INDEX>
100+
<INDEX><PRIMITIVE/><SUBINDEX><USE>math_max</USE><ECMA>Math.max</ECMA></SUBINDEX></INDEX>
101101
<SPLITINLINE>
102102
<SCHEME><SCHEMEINLINE>max</SCHEMEINLINE></SCHEME>
103103
<JAVASCRIPT><JAVASCRIPTINLINE>math_max</JAVASCRIPTINLINE></JAVASCRIPT>

xml/chapter2/section2/subsection1.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pair(1,
119119
</SPLITINLINE>
120120
provides a primitive called
121121
<INDEX><DECLARATION>list</DECLARATION> (primitive function)</INDEX>
122-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>list</DECLARATION> (\textit{ns})</SUBINDEX></INDEX>
122+
<INDEX><PRIMITIVE/><SUBINDEX><USE>list</USE> (\textit{ns})</SUBINDEX></INDEX>
123123
<SCHEMEINLINE>list</SCHEMEINLINE> to help in constructing
124124
lists.<FOOTNOTE>In this book, we use <EM>list</EM> to mean a chain of
125125
pairs terminated by the end-of-list marker. In contrast, the term
@@ -129,7 +129,7 @@ pair(1,
129129
not just to lists.</FOOTNOTE>
130130
The above sequence could be produced by
131131
<INDEX><DECLARATION>list</DECLARATION> (primitive function)</INDEX>
132-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>list</DECLARATION> (\textit{ns})</SUBINDEX></INDEX>
132+
<INDEX><PRIMITIVE/><SUBINDEX><USE>list</USE> (\textit{ns})</SUBINDEX></INDEX>
133133
<SPLITINLINE>
134134
<SCHEME>
135135
<SCHEMEINLINE>(list 1 2 3 4)</SCHEMEINLINE>.</SCHEME>
@@ -596,7 +596,7 @@ const odds = list(1, 3, 5, 7);
596596
includes a primitive
597597
predicate
598598
<INDEX><DECLARATION>is_null</DECLARATION> (primitive function)</INDEX>
599-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>is_null</DECLARATION> (\textit{ns})</SUBINDEX></INDEX>
599+
<INDEX><PRIMITIVE/><SUBINDEX><USE>is_null</USE> (\textit{ns})</SUBINDEX></INDEX>
600600
<INDEX>empty list<SUBINDEX>recognizing with <JAVASCRIPTINLINE>is_null</JAVASCRIPTINLINE></SUBINDEX></INDEX>
601601
<INDEX><USE>null</USE> (keyword)<SUBINDEX>recognizing with <JAVASCRIPTINLINE>is_null</JAVASCRIPTINLINE></SUBINDEX></INDEX>
602602
<SPLITINLINE>

xml/chapter2/section2/subsection2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ count_leaves(list(x, x));
361361
</SPLITINLINE>
362362
provides the primitive predicate
363363
<INDEX><DECLARATION>is_pair</DECLARATION> (primitive function)</INDEX>
364-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>is_pair</DECLARATION> (\textit{ns})</SUBINDEX></INDEX>
364+
<INDEX><PRIMITIVE/><SUBINDEX><USE>is_pair</USE> (\textit{ns})</SUBINDEX></INDEX>
365365
<SPLITINLINE>
366366
<SCHEME><SCHEMEINLINE>pair?</SCHEMEINLINE>,</SCHEME>
367367
<JAVASCRIPT><JAVASCRIPTINLINE>is_pair</JAVASCRIPTINLINE>,</JAVASCRIPT>

xml/chapter2/section3/subsection2.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@
261261
</TABLE>
262262
Using these, and the primitive predicate
263263
<INDEX><DECLARATION>is_number</DECLARATION> (primitive function)</INDEX>
264-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>is_number</DECLARATION> (\textit{ns})</SUBINDEX></INDEX>
264+
<INDEX><PRIMITIVE/><SUBINDEX><USE>is_number</USE> (\textit{ns})</SUBINDEX></INDEX>
265265
<SPLITINLINE>
266266
<SCHEME><SCHEMEINLINE>number?</SCHEMEINLINE>,</SCHEME>
267267
<JAVASCRIPT><JAVASCRIPTINLINE>is_number</JAVASCRIPTINLINE>,</JAVASCRIPT>
@@ -378,7 +378,7 @@ function deriv(exp, variable) {
378378
</SPLITINLINE>
379379
They are identified by the primitive predicate
380380
<INDEX><DECLARATION>is_string</DECLARATION> (primitive function)</INDEX>
381-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>is_string</DECLARATION> (\textit{ns})</SUBINDEX></INDEX>
381+
<INDEX><PRIMITIVE/><SUBINDEX><USE>is_string</USE> (\textit{ns})</SUBINDEX></INDEX>
382382
<SPLITINLINE>
383383
<SCHEME><SCHEMEINLINE>symbol?</SCHEMEINLINE>:</SCHEME>
384384
<JAVASCRIPT><JAVASCRIPTINLINE>is_string</JAVASCRIPTINLINE>:

xml/chapter2/section4/subsection1.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,14 @@ function div_complex(z1, z2) {
238238
computed by Scheme<APOS/>s
239239
<INDEX>arctangent</INDEX>
240240
<INDEX><DECLARATION>math_atan2</DECLARATION> (primitive function)</INDEX>
241-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>math_atan2</DECLARATION><ECMA>Math.atan2</ECMA></SUBINDEX></INDEX>
241+
<INDEX><PRIMITIVE/><SUBINDEX><USE>math_atan2</USE><ECMA>Math.atan2</ECMA></SUBINDEX></INDEX>
242242
<SCHEMEINLINE>atan</SCHEMEINLINE> procedure,
243243
</SCHEME>
244244
<JAVASCRIPT>
245245
computed by JavaScript<APOS/>s
246246
<INDEX>arctangent</INDEX>
247247
<INDEX><DECLARATION>math_atan2</DECLARATION> (primitive function)</INDEX>
248-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>math_atan2</DECLARATION><ECMA>Math.atan2</ECMA></SUBINDEX></INDEX>
248+
<INDEX><PRIMITIVE/><SUBINDEX><USE>math_atan2</USE><ECMA>Math.atan2</ECMA></SUBINDEX></INDEX>
249249
<JAVASCRIPTINLINE>math_atan2</JAVASCRIPTINLINE> function,
250250
</JAVASCRIPT>
251251
</SPLITINLINE>

xml/chapter2/section5/subsection2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1499,7 +1499,7 @@ put("raise", list("javascript_number"),
14991499
various projection operations<FOOTNOTE>A real number can be projected to
15001500
an integer using the
15011501
<INDEX><DECLARATION>math_round</DECLARATION> (primitive function)</INDEX>
1502-
<INDEX><PRIMITIVE/><SUBINDEX><DECLARATION>math_round</DECLARATION><ECMA>Math.round</ECMA></SUBINDEX></INDEX>
1502+
<INDEX><PRIMITIVE/><SUBINDEX><USE>math_round</USE><ECMA>Math.round</ECMA></SUBINDEX></INDEX>
15031503
<SPLITINLINE>
15041504
<SCHEME>
15051505
<SCHEMEINLINE>round</SCHEMEINLINE>

0 commit comments

Comments
 (0)