-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathr6rs-errata.patch
14023 lines (13681 loc) · 511 KB
/
r6rs-errata.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff --git b/document/Makefile a/document/Makefile
index 2635a43..a432a92 100644
--- b/document/Makefile
+++ a/document/Makefile
@@ -4,8 +4,7 @@ BIBTEX = bibtex
MAKEINDEX = makeindex
SCHEME = scheme48 -a batch
MZSCHEME = mzscheme
-# use the one from tex2page distro, *not* the one included with PLT Scheme
-TEX2PAGE = tex2page
+TEX2PAGE = ./tex2page
report: thirdrun
@@ -69,8 +68,8 @@ r6rs.ind : r6rs.idx r6rs-lib.idx
r6rs-lib.ind : r6rs-lib.idx
$(MAKEINDEX) -s r6rs.mst -c r6rs-lib.idx
-r6rs-app.ind : r6rs-app.idx
- $(MAKEINDEX) -s r6rs.mst -c r6rs-app.idx
+# r6rs-app.ind : r6rs-app.idx
+# $(MAKEINDEX) -s r6rs.mst -c r6rs-app.idx
r6rs-rationale.ind : r6rs-rationale.idx
$(MAKEINDEX) -s r6rs.mst -c r6rs-rationale.idx
@@ -85,7 +84,7 @@ r6rs.dvi : r6rs.bbl r6rs.ind r6-fig-grammar-parti.tex
r6rs-lib.dvi : r6rs-lib.bbl r6rs-lib.ind
$(LATEX) r6rs-lib
-r6rs-app.dvi : r6rs-app.bbl r6rs-app.ind
+r6rs-app.dvi : r6rs-app.bbl
$(LATEX) r6rs-app
r6rs-rationale.dvi : r6rs-rationale.bbl r6rs-rationale.ind
@@ -109,7 +108,7 @@ r6rs.pdf : r6rs.bbl r6rs.ind r6-fig-grammar-parti.tex
r6rs-lib.pdf : r6rs-lib.bbl r6rs-lib.ind
$(LATEX) r6rs-lib
-r6rs-app.pdf : r6rs-app.bbl r6rs-app.ind
+r6rs-app.pdf : r6rs-app.bbl
$(LATEX) r6rs-app
r6rs-rationale.pdf : r6rs-rationale.bbl r6rs-rationale.ind
@@ -119,7 +118,7 @@ endif
r6rs-lib.idx r6rs-lib.aux : $(COMMON_TEX_FILES) $(LIB_TEX_FILES)
$(LATEX) r6rs-lib
-r6rs-app.idx r6rs-app.aux : $(COMMON_TEX_FILES) $(LIB_TEX_FILES)
+r6rs-app.aux : $(COMMON_TEX_FILES) $(LIB_TEX_FILES)
$(LATEX) r6rs-app
r6rs-rationale.idx r6rs-rationale.aux : $(COMMON_TEX_FILES) $(RATIONALE_TEX_FILES)
diff --git b/document/arith.tex a/document/arith.tex
index d45480a..b8d1f58 100644
--- b/document/arith.tex
+++ a/document/arith.tex
@@ -113,11 +113,11 @@ With one argument, this procedure returns the additive
inverse of its argument, provided that integer object is a
fixnum.
-An exception with condition type {\cf\&assertion} is raised if the
+An exception with condition type {\cf\&implementation-restriction} is raised if the
mathematically correct result of this procedure is not a fixnum.
\begin{scheme}
-(fx- (least-fixnum)) \xev \exception{\&assertion}%
+(fx- (least-fixnum)) \lev \exception{\&implementation-restriction}%
\end{scheme}
\end{entry}
@@ -225,7 +225,7 @@ number of 1 bits in the two's complement representation of \var{fx}.
Otherwise it returns the result of the following computation:
%
\begin{scheme}
-(fxnot (fxbit-count (fxnot \var{ei})))%
+(fxnot (fxbit-count (fxnot \var{fx})))%
\end{scheme}
\end{entry}
@@ -264,17 +264,18 @@ the two's complement representation of \var{fx}. If
\begin{entry}{%
\proto{fxbit-set?}{ \vari{fx} \varii{fx}}{procedure}}
-\domain{\varii{Fx} must be non-negative and less than {\cf
- (fixnum-width)}.} The {\cf fxbit-set?} procedure returns
+\domain{\varii{Fx} must be non-negative.} The {\cf fxbit-set?} procedure returns
\schtrue{} if the \varii{fx}th bit is 1 in the two's complement
representation of \vari{fx}, and \schfalse{} otherwise. This is the
-fixnum result of the following computation:
+result of the following computation:
%
\begin{scheme}
-(not
- (fxzero?
- (fxand \vari{fx}
- (fxarithmetic-shift-left 1 \varii{fx}))))%
+(if (fx>=? \varii{fx} (fx- (fixnum-width) 1))
+ (fxnegative? \vari{fx})
+ (not
+ (fxzero?
+ (fxand \vari{fx}
+ (fxarithmetic-shift-left 1 \varii{fx})))))%
\end{scheme}
%
\end{entry}
@@ -283,7 +284,7 @@ fixnum result of the following computation:
\proto{fxcopy-bit}{ \vari{fx} \varii{fx} \variii{fx}}{procedure}}
\domain{\varii{Fx} must be non-negative and less than {\cf
- (fixnum-width)}. \variii{Fx} must be 0 or
+ $w-1$}. \variii{Fx} must be 0 or
1.} The {\cf fxcopy-bit} procedure returns the result of replacing
the \varii{fx}th bit of \vari{fx} by \variii{fx}, which is
the result of the following computation:
@@ -300,7 +301,7 @@ the result of the following computation:
\proto{fxbit-field}{ \vari{fx} \varii{fx} \variii{fx}}{procedure}}
\domain{\varii{Fx} and \variii{fx} must be non-negative and less than
- {\cf (fixnum-width)}. Moreover, \varii{fx} must be less than or
+ $w$. Moreover, \varii{fx} must be less than or
equal to \variii{fx}.} The {\cf fxbit-field} procedure returns the
number represented by the bits at the positions from \varii{fx} (inclusive) to
$\variii{fx}$ (exclusive), which is
@@ -319,10 +320,12 @@ the fixnum result of the following computation:
\proto{fxcopy-bit-field}{ \vari{fx} \varii{fx} \variii{fx} \variv{fx}}{procedure}}
\domain{\varii{Fx} and \variii{fx} must be non-negative and less than
- {\cf (fixnum-width)}. Moreover, \varii{fx} must be less than or
+ $w$. Moreover, \varii{fx} must be less than or
equal to \variii{fx}.} The {\cf fxcopy-bit-field} procedure returns
the result of replacing in \vari{fx} the bits at positions from
-\varii{fx} (inclusive) to $\variii{fx}$ (exclusive) by the corresponding bits in \variv{fx}, which
+\varii{fx} (inclusive) to $\variii{fx}$ (exclusive) by the bits in
+\variv{fx} from position 0 (inclusive) to position
+$\variii{fx}-\varii{fx}$ (exclusive), which
is the fixnum result of the following computation:
\begin{scheme}
(let* ((to \vari{fx})
@@ -332,18 +335,27 @@ is the fixnum result of the following computation:
(mask1 (fxarithmetic-shift-left -1 start))
(mask2 (fxnot
(fxarithmetic-shift-left -1 end)))
- (mask (fxand mask1 mask2)))
+ (mask (fxand mask1 mask2))
+ (mask3 (fxnot (fxarithmetic-shift-left
+ -1 (- end start)))))
(fxif mask
- (fxarithmetic-shift-left from start)
+ (fxarithmetic-shift-left (fxand from mask3)
+ start)
to))%
\end{scheme}
+
+\begin{scheme}
+(fxcopy-bit-field \sharpsign{}b0000001 2 5 \sharpsign{}b1111000) \lev 1
+(fxcopy-bit-field \sharpsign{}b0000001 2 5 \sharpsign{}b0001111) \lev 29
+(fxcopy-bit-field \sharpsign{}b0001111 2 5 \sharpsign{}b0001111) \lev 31%
+\end{scheme}
\end{entry}
\begin{entry}{%
\proto{fxarithmetic-shift}{ \vari{fx} \varii{fx}}{procedure}}
\domain{The absolute value of \varii{fx} must be less than
-{\cf (fixnum-width)}.} If
+$w$.} If
%
\begin{scheme}
(floor (* \vari{fx} (expt 2 \varii{fx})))%
@@ -358,8 +370,7 @@ raised.
\proto{fxarithmetic-shift-left}{ \vari{fx} \varii{fx}}{procedure}
\proto{fxarithmetic-shift-right}{ \vari{fx} \varii{fx}}{procedure}}
-\domain{\varii{Fx} must be non-negative, and less than {\cf
- (fixnum-width)}.}
+\domain{\varii{Fx} must be non-negative, and less than $w$.}
The {\cf fxarithmetic-shift-left} procedure behaves the same as {\cf
fxarithmetic-shift}, and {\cf (fxarithmetic-shift-right \vari{fx}
\varii{fx})} behaves the same as {\cf (fxarithmetic-shift \vari{fx}
@@ -370,8 +381,8 @@ raised.
\proto{fxrotate-bit-field}{ \vari{fx} \varii{fx} \variii{fx} \variv{fx}}{procedure}}
\domain{\varii{Fx}, \variii{fx}, and \variv{fx} must be non-negative
- and less than {\cf (fixnum-width)}. \varii{Fx} must be less than or
- equal to \variii{fx}. \variv{Fx} must be less than the difference
+ and less than $w$. \varii{Fx} must be less than or
+ equal to \variii{fx}. \variv{Fx} must be less than or equal to the difference
between \variii{fx} and \varii{fx}.} The {\cf fxrotate-bit-field}
procedure returns the result of cyclically permuting in \vari{fx} the
bits at positions from \varii{fx} (inclusive) to \variii{fx}
@@ -384,19 +395,14 @@ following computation:
(end \variii{fx})
(count \variv{fx})
(width (fx- end start)))
- (if (fxpositive? width)
- (let* ((count (fxmod count width))
- (field0
- (fxbit-field n start end))
- (field1
- (fxarithmetic-shift-left
- field0 count))
- (field2
- (fxarithmetic-shift-right
- field0 (fx- width count)))
- (field (fxior field1 field2)))
- (fxcopy-bit-field n start end field))
- n))%
+ (fxcopy-bit-field n start end
+ (fxior
+ (fxarithmetic-shift-left
+ (fxbit-field n start (fx- end count))
+ count)
+ (fxarithmetic-shift-right
+ (fxbit-field n start end)
+ (fx- width count)))))%
\end{scheme}
\end{entry}
@@ -405,7 +411,7 @@ following computation:
\proto{fxreverse-bit-field}{ \vari{fx} \varii{fx} \variii{fx}}{procedure}}
\domain{\varii{Fx} and \variii{fx} must be non-negative and less than
- {\cf (fixnum-width)}. Moreover, \varii{fx} must be less than or
+ $w$. Moreover, \varii{fx} must be less than or
equal to \variii{fx}.} The {\cf fxreverse-bit-field} procedure
returns
the fixnum obtained from \vari{fx} by reversing the
@@ -459,19 +465,19 @@ argument.
\proto{fl>=?}{ \vari{fl} \varii{fl} \variii{fl} \dotsfoo}{procedure}}
These procedures return \schtrue{} if their arguments are (respectively):
-equal, monotonically increasing, monotonically decreasing,
-monotonically nondecreasing, or monotonically nonincreasing,
+equal, monotonically increasing, monotonically nondecreasing,
+monotonically decreasing, or monotonically nonincreasing,
\schfalse{} otherwise. These
predicates must be transitive.
\begin{scheme}
-(fl= +inf.0 +inf.0) \ev \schtrue{}
-(fl= -inf.0 +inf.0) \ev \schfalse{}
-(fl= -inf.0 -inf.0) \ev \schtrue{}
-(fl= 0.0 -0.0) \ev \schtrue{}
-(fl< 0.0 -0.0) \ev \schfalse{}
-(fl= +nan.0 \var{fl}) \ev \schfalse{}
-(fl< +nan.0 \var{fl}) \ev \schfalse{}%
+(fl=? +inf.0 +inf.0) \ev \schtrue{}
+(fl=? -inf.0 +inf.0) \ev \schfalse{}
+(fl=? -inf.0 -inf.0) \ev \schtrue{}
+(fl=? 0.0 -0.0) \ev \schtrue{}
+(fl<? 0.0 -0.0) \ev \schfalse{}
+(fl=? +nan.0 \var{fl}) \ev \schfalse{}
+(fl<? +nan.0 \var{fl}) \ev \schfalse{}%
\end{scheme}
\end{entry}
@@ -509,7 +515,7 @@ than zero, {\cf flodd?} tests whether it is odd,
\begin{note}
{\cf (flnegative? -0.0)} must return \schfalse{},
else it would lose the correspondence with
-{\cf (fl< -0.0 0.0)}, which is \schfalse{}
+{\cf (fl<? -0.0 0.0)}, which is \schfalse{}
according to IEEE 754~\cite{IEEE}.
\end{note}
\end{entry}
@@ -584,8 +590,14 @@ Returns the absolute value of \var{fl}.
These procedures implement number-theoretic integer division and
return the results of the corresponding mathematical operations
-specified in report section~\extref{report:integerdivision}{Integer division}. For zero divisors, these
-procedures may return a NaN or some unspecified flonum.
+specified in report section~\extref{report:integerdivision}{Integer division}.
+In the cases where the
+mathematical requirements in section~\extref{report:integerdivision} cannot be
+satisfied by any number object, either an exception is raised with
+condition type {\cf\&implementation-restriction}, or unspecified
+flonums (one for {\cf fldiv} {\cf flmod}, {\cf fldiv0} and {\cf
+ flmod0}, two for {\cf fldiv-and-mod} and {\cf fldiv0-and-mod0}) are
+returned.
\begin{scheme}
(fldiv \vari{fl} \varii{fl}) \ev \(\vari{fl}~\mathrm{div}~\varii{fl}\)
@@ -712,16 +724,19 @@ the result may be a NaN or some unspecified flonum.
negative, \varii{fl} should be an integer object.}
The {\cf flexpt} procedure returns \vari{fl} raised to the power \varii{fl}. If \vari{fl} is
negative and \varii{fl} is not an integer object, the result may be a
-NaN, or may be some unspecified flonum. If \vari{fl} is zero, then
-the result is zero.
+NaN, or may be some unspecified flonum.
+If \vari{fl} and \varii{fl} are both zero, the result is
+1.0. If \vari{fl} is zero and \varii{fl} is positive, the result is zero.
+If \vari{fl} is zero and \varii{fl} is negative, the result may be a NaN, or may be
+some unspecified flonum.
\end{entry}
\begin{entry}{%
\ctproto{no-infinities}
-\proto{make-no-infinities-violation}{ obj}{procedure}
+\proto{make-no-infinities-violation}{}{procedure}
\proto{no-infinities-violation?}{ obj}{procedure}
\ctproto{no-nans}
-\proto{make-no-nans-violation}{ obj}{procedure}
+\proto{make-no-nans-violation}{}{procedure}
\proto{no-nans-violation?}{ obj}{procedure}}
These condition types could be defined by the following code:
@@ -865,7 +880,7 @@ otherwise. This is the result of the following computation:
\domain{\varii{Ei} must be non-negative, and \variii{ei}
must be either $0$ or $1$.}
The {\cf bitwise-copy-bit} procedure returns the result of replacing
-the \varii{ei}th bit of \vari{ei} by the \varii{ei}th bit of \variii{ei}, which is
+the \varii{ei}th bit of \vari{ei} by \variii{ei}, which is
the result of the following computation:
\begin{scheme}
(let* ((mask (bitwise-arithmetic-shift-left 1 \varii{ei})))
@@ -902,8 +917,10 @@ the result of the following computation:
and \varii{ei} must be less than or equal to \variii{ei}.}
The {\cf bitwise-copy-bit-field} procedure returns
the result of replacing in \vari{ei} the bits at positions from
-\varii{ei} (inclusive) to $\variii{ei}$ (exclusive) by the corresponding bits in \variv{ei}, which
-is the fixnum result of the following computation:
+\varii{ei} (inclusive) to $\variii{ei}$ (exclusive) by the bits in
+\variv{ei} from position 0 (inclusive) to position
+$\variii{ei}-\varii{ei}$ (exclusive), which
+is the result of the following computation:
%
\begin{scheme}
(let* ((to \vari{ei})
@@ -964,9 +981,8 @@ returns the same result as
\proto{bitwise-rotate-bit-field}{ \vari{ei} \varii{ei} \variii{ei} \variv{ei}}{procedure}}
\domain{\varii{Ei}, \variii{ei}, \variv{ei} must be non-negative,
-\varii{ei} must be less than or equal to \variii{ei}, and
-\variv{ei} must be non-negative.}
-procedure returns the result of cyclically permuting in \vari{ei} the
+\varii{ei} must be less than or equal to \variii{ei}.}
+The {\cf bitwise-rotate-bit-field} procedure returns the result of cyclically permuting in \vari{ei} the
bits at positions from \varii{ei} (inclusive) to \variii{ei} (exclusive) by \variv{ei} bits
towards the more significant bits, which is the result of the
following computation:
diff --git b/document/base.tex a/document/base.tex
index 2ff892b..7917cc0 100644
--- b/document/base.tex
+++ a/document/base.tex
@@ -135,9 +135,6 @@ All bindings established by a set of definitions, whether
keyword or variable definitions, are visible within the definitions
themselves.
-\implresp The implementation should detect if the value of
-\hyper{expression} cannot possibly be a transformer.
-
Example:
\begin{scheme}
@@ -151,6 +148,9 @@ Example:
(even? 10)) \ev \schtrue{}%
\end{scheme}
+\implresp The implementation should detect if the value of
+\hyper{expression} cannot possibly be a transformer.
+
An implication of the left-to-right processing order
(section~\ref{expansionchapter}) is that one definition can
affect whether a subsequent form is also a definition.
@@ -294,7 +294,7 @@ The results of the last expression in the body are returned as
the results of the procedure call.
\begin{scheme}
-(lambda (x) (+ x x)) \ev {\em{}a procedure}
+(lambda (x) (+ x x)) \ev \textnormal{\textit{a procedure}}
((lambda (x) (+ x x)) 4) \ev 8
((lambda (x)
@@ -523,7 +523,7 @@ otherwise the {\cf case} expression returns \unspecifiedreturn.
\begin{scheme}
(case (* 2 3)
((2 3 5 7) 'prime)
- ((1 4 6 8 9) 'composite)) \ev composite
+ ((4 6 8 9) 'composite)) \ev composite
(case (car '(c d))
((a) 'a)
((b) 'b)) \ev \theunspecified
@@ -956,7 +956,7 @@ context:
(begin (display "4 plus 1 equals ")
(display (+ 4 1))) \ev \unspecified
- \>{\em and prints} 4 plus 1 equals 5%
+ \>\textnormal{\textit{and prints}} 4 plus 1 equals 5%
\end{scheme}
\end{entry}
@@ -1002,7 +1002,8 @@ The {\cf eqv?} procedure returns \schtrue{} if one of the following holds:
yield the same results (in the sense of {\cf eqv?}) when passed
as arguments to any other procedure that can be defined
as a finite composition of Scheme's standard arithmetic
- procedures.
+ procedures, as long as the evaluation of that application does not
+ involve NaN.
\item \vari{Obj} and \varii{obj} are both characters and are the same
character according to the {\cf char=?} procedure
@@ -1012,7 +1013,7 @@ character according to the {\cf char=?} procedure
\item \vari{Obj} and \varii{obj} are objects such as pairs, vectors, bytevectors
(library chapter~\extref{lib:bytevectorschapter}{Bytevectors}),
- strings, hashtables, records (library
+ strings, records (library
chapter~\extref{lib:recordschapter}{Records}), ports (library
section~\extref{lib:portsiosection}{Port I/O}), or hashtables
(library chapter~\extref{lib:hashtablechapter}{Hash tables}) that
@@ -1044,7 +1045,8 @@ The {\cf eqv?} procedure returns \schfalse{} if one of the following holds:
\item \vari{Obj} and \varii{obj} yield different results (in the sense of
{\cf eqv?}) when passed as arguments to any other procedure
that can be defined as a finite composition of Scheme's
- standard arithmetic procedures.
+ standard arithmetic procedures, as long as the evaluation of that
+ application does not involve NaN.
\item \vari{Obj} and \varii{obj} are characters for which the {\cf char=?}
procedure returns \schfalse{}.
@@ -1105,7 +1107,7 @@ boolean.
(lambda (x) x)) \ev \unspecified
(eqv? (lambda (x) x)
(lambda (y) y)) \ev \unspecified
-(eqv? +nan.0 +nan.0) \ev \unspecified%
+(eqv? +nan.0 +nan.0) \ev \unspecified%
\end{scheme}
The next set of examples shows the use of {\cf eqv?}\ with procedures
@@ -1144,9 +1146,6 @@ not detect this equivalence.
Implementations may
share structure between constants where appropriate.
-Furthermore, a constant may be copied at any time by the implementation so
-as to exist simultaneously in different sets of locations, as noted in
-section~\ref{quote}.
Thus the value of {\cf eqv?} on constants is sometimes
implementation-dependent.
@@ -1185,7 +1184,7 @@ from {\cf eqv?} on empty vectors, empty bytevectors, and empty strings.
(eq? '() '()) \ev \schtrue
(eq? 2 2) \ev \unspecified
(eq? \#\backwhack{}A \#\backwhack{}A) \ev \unspecified
-(eq? car car) \ev \schtrue
+(eq? car car) \ev \unspecified
(let ((n (+ 2 3)))
(eq? n n)) \ev \unspecified
(let ((x '(a)))
@@ -1628,7 +1627,7 @@ inexact number objects of the appropriate type have bounded precision, then
the value returned is an inexact number object that is nearest to the
argument. If an exact argument has no reasonably close inexact
equivalent, an exception with condition type
-{\cf\&implementation-violation} may be
+{\cf\&implementation-restriction} may be
raised.
\begin{note}
@@ -1644,7 +1643,7 @@ returned is the exact number object that is numerically closest to the
argument; in most cases, the result of this procedure should be
numerically equal to its argument. If an inexact argument has no
reasonably close exact equivalent, an exception with condition type
-{\cf\&implementation-violation} may be
+{\cf\&implementation-restriction} may be
raised.
These procedures implement the natural one-to-one correspondence
@@ -1677,8 +1676,8 @@ nonincreasing, and \schfalse{} otherwise.
For any real number object \var{x} that is neither infinite nor NaN:
\begin{scheme}
-(< -inf.0 \var{x} +inf.0)) \ev \schtrue{}
-(> +inf.0 \var{x} -inf.0)) \ev \schtrue{}%
+(< -inf.0 \var{x} +inf.0) \ev \schtrue{}
+(> +inf.0 \var{x} -inf.0) \ev \schtrue{}%
\end{scheme}
For any number object \var{z}:
@@ -1762,7 +1761,7 @@ These procedures return the maximum or minimum of their arguments.
(max 3.9 4) \ev 4.0%
\end{scheme}
-For any real number object \var{x}:
+For any real number object \var{x} that is not a NaN:
\begin{scheme}
(max +inf.0 \var{x}) \ev +inf.0
@@ -1842,7 +1841,7 @@ consistent with the following examples:
\begin{entry}{%
\proto{-}{ z}{procedure}
-\rproto{-}{ \vari{z} \varii{z} \dotsfoo}{procedure}}
+\rproto{-}{ \vari{z} \varii{z} \variii{z} \dotsfoo}{procedure}}
With two or more arguments, this procedures returns the difference of
its arguments, associating to the left. With one argument, however,
@@ -1875,7 +1874,7 @@ consistent with the following examples:
\begin{entry}{%
\proto{/}{ z}{procedure}
-\rproto{/}{ \vari{z} \varii{z} \dotsfoo}{procedure}}
+\rproto{/}{ \vari{z} \varii{z} \variii{z} \dotsfoo}{procedure}}
\domain{If all of the arguments are exact, then the divisors must all
be nonzero.}
@@ -1927,9 +1926,14 @@ Returns the absolute value of its argument.
These procedures implement number-theoretic integer division and
return the results of the corresponding mathematical operations
-specified in section~\ref{integerdivision}. In each case, \vari{x}
-must be neither infinite nor a NaN, and \varii{x} must be nonzero;
-otherwise, an exception with condition type {\cf\&assertion} is raised.
+specified in section~\ref{integerdivision}. If \vari{x} and \varii{x}
+are exact, \varii{x} must be nonzero. In the cases where the
+mathematical requirements in section~\ref{integerdivision} cannot be
+satisfied by any number object, either an exception is raised with
+condition type {\cf\&implementation-restriction}, or unspecified
+number objects (one for {\cf div} {\cf mod}, {\cf div0} and {\cf
+ mod0}, two for {\cf div-and-mod} and {\cf div0-and-mod0}) are
+returned.
\begin{scheme}
(div \vari{x} \varii{x}) \ev \(\vari{x}~\mathrm{div}~\varii{x}\)
@@ -1937,7 +1941,7 @@ otherwise, an exception with condition type {\cf\&assertion} is raised.
(div-and-mod \vari{x} \varii{x}) \ev \(\vari{x}~\mathrm{div}~\varii{x}, \vari{x}~\mathrm{mod}~\varii{x}\)\\\>\>\>; \textrm{two return values}
(div0 \vari{x} \varii{x}) \ev \(\vari{x}~\mathrm{div}_0~\varii{x}\)
(mod0 \vari{x} \varii{x}) \ev \(\vari{x}~\mathrm{mod}_0~\varii{x}\)
-(div0-and-mod0 \vari{x} \varii{x}) \lev \(\vari{x}~\mathrm{div}_0~\varii{x}, \vari{x}~\mathrm{mod}_0~\varii{x}\)\\\>\>; \textrm{two return values}%
+(div0-and-mod0 \vari{x} \varii{x}) \lev \(\vari{x}~\mathrm{div}_0~\varii{x}, \vari{x}~\mathrm{mod}_0~\varii{x}\)\\\>\>\>; \textrm{two return values}%
\end{scheme}
\begin{entry}{%
@@ -2024,7 +2028,7 @@ given a NaN.
\begin{entry}{%
\proto{rationalize}{ \vari{x} \varii{x}}{procedure}}
-The {\cf rationalize} procedure returns the a number object
+The {\cf rationalize} procedure returns a number object
representing the {\em simplest} rational
number differing from \vari{x} by no more than \varii{x}. A rational number $r_1$ is
{\em simpler} \mainindex{simplest rational} than another rational number
@@ -2145,7 +2149,7 @@ values of \vari{z} and \varii{z}, {\cf (expt \vari{z}
(expt 5 -3) \ev 1/125
(expt 5 0) \ev 1
(expt 0 5) \ev 0
-(expt 0 5+.0000312i) \ev 0
+(expt 0 5+.0000312i) \ev 0.0
(expt 0 -5) \ev \unspecified
(expt 0 -5+.0000312i) \ev \unspecified
(expt 0 0) \ev 1
@@ -2186,7 +2190,7 @@ returns $a_3$, and {\cf (angle \var{z})} returns $a_4$.
\begin{scheme}
(real-part 1.1+2.2i) \ev 1.1 ; \textrm{approximately}
-(imag-part 1.1+2.2i) \ev 2.2i ; \textrm{approximately}
+(imag-part 1.1+2.2i) \ev 2.2 ; \textrm{approximately}
(magnitude 1.1@2.2) \ev 1.1 ; \textrm{approximately}
(angle 1.1@2.2) \ev 2.2 ; \textrm{approximately}
@@ -2273,7 +2277,9 @@ Returns a number object with maximally precise representation expressed by the
given \var{string}. \var{Radix} must be an exact integer object, either 2, 8, 10,
or 16. If supplied, \var{radix} is a default radix that may be overridden
by an explicit radix prefix in \var{string} (e.g., {\tt "\#o177"}). If \var{radix}
-is not supplied, then the default radix is 10. If \var{string} is not
+is not supplied, then the default radix is 10. If
+the arguments are as specified,
+ \var{string} is not
a syntactically valid notation for a number object or a notation for a
rational number object with a zero denominator, then {\cf string->number}
returns \schfalse{}.
@@ -2289,8 +2295,9 @@ returns \schfalse{}.
\end{scheme}
\begin{note}
- The {\cf string->number} procedure always returns a number object or
- \schfalse{}; it never raises an exception.
+ If the arguments to {\cf string->number} are a string and a valid
+ radix as specified, it must produce a number object or \schfalse{};
+ it may not raise an exception.
\end{note}
\end{entry}
@@ -2495,7 +2502,7 @@ twenty-eight of these procedures in all.
\proto{null?}{ obj}{procedure}}
Returns \schtrue{} if \var{obj} is the empty list\index{empty list},
-\schfalse otherwise.
+\schfalse{} otherwise.
\end{entry}
@@ -2540,24 +2547,28 @@ Returns the length of \var{list}.
\begin{entry}{%
-\proto{append}{ list \dotsfoo{} obj}{procedure}}
+\proto{append}{ list \dotsfoo{} obj}{procedure}
+\rproto{append}{}{procedure}}
Returns a possibly improper list consisting of the elements of the first \var{list}
followed by the elements of the other \var{list}s, with \var{obj} as
the cdr of the final pair.
An improper list results if \var{obj} is not a
-list.
+list. The {\cf append} procedure returns the empty list if called
+with no arguments.
\begin{scheme}
(append '(x) '(y)) \ev (x y)
(append '(a) '(b c d)) \ev (a b c d)
(append '(a (b)) '((c))) \ev (a (b) (c))
(append '(a b) '(c . d)) \ev (a b c . d)
-(append '() 'a) \ev a%
+(append '() 'a) \ev a
+(append) \ev ()
+(append 'a) \ev a%
\end{scheme}
-If {\cf append} constructs a nonempty chain of pairs, it is always
-newly allocated. If no pairs are allocated, \var{obj} is returned.
+The return value is made from new pairs for all arguments but the
+last; the last is merely placed at the end of the new structure.
\end{entry}
@@ -2595,7 +2606,7 @@ of pairs beyond this length.
\proto{list-ref}{ list k}{procedure}}
\domain{\var{List} must be a list whose length is at least $\var{k}+1$.}
-The {\cf list-tail} procedure returns the \var{k}th element of \var{list}.
+The {\cf list-ref} procedure returns the \var{k}th element of \var{list}.
\begin{scheme}
(list-ref '(a b c d) 2) \ev c%
@@ -2762,8 +2773,9 @@ Returns the symbol whose name is \var{string}.
\mainindex{Unicode}
\mainindex{scalar value}
+\mainindex{character}
-\defining{Characters} are objects that represent Unicode scalar
+\textit{Characters} are objects that represent Unicode scalar
values~\cite{Unicode}.
\begin{note}
@@ -3584,8 +3596,8 @@ As noted in section~\ref{abbreviationsection},
\lev (a 3 4 5 6 b)
`(({\cf foo} ,(- 10 3)) ,@(cdr '(c)) . ,(car '(cons))) %
\lev ((foo 7) . cons)
-`\#(10 5 ,(sqrt 4) ,@(map sqrt '(16 9)) 8) %
- \lev \#(10 5 2 4 3 8)
+`\#(10 5 ,(- 4) ,@(map - '(16 9)) 8) %
+ \lev \#(10 5 -4 -16 -9 8)
(let ((name 'foo))
`((unquote name name name)))%
\lev (foo foo foo)
@@ -3597,7 +3609,7 @@ As noted in section~\ref{abbreviationsection},
(unquote (append x y) (sqrt 9)))
(let ((x '(2 3))
(y '(4 5)))
- `(foo (unquote (append x y) (sqrt 9)))) \lev (foo (2 3 4 5) 3)%
+ `(foo (unquote (append x y) (- 9)))) \lev (foo (2 3 4 5) -9)%
\end{scheme}
Quasiquote forms may be nested. Substitutions are made only for
@@ -3965,7 +3977,7 @@ $P_n$.
\item $P$ is of the form
{\cf \#($P_1$ \dotsfoo{} $P_k$ $P_e$ \hyper{ellipsis} $P_{m+1}$ \dotsfoo{} $P_n$)},
where \hyper{ellipsis} is the identifier {\cf ...}
-and $F$ is a vector of $n$ or more elements
+and $F$ is a vector of $n$ elements
whose first $k$ elements match $P_1$ through $P_k$,
whose next $m-k$ elements each match $P_e$,
and
@@ -4092,7 +4104,7 @@ replaced by \hyperii{template}.
((set! \_ e) (set-car! p e))))
(set! p.car 15)
p.car \ev 15
-p \ev (15 5)%
+p \ev (15 . 5)%
\end{scheme}
\end{entry}
diff --git b/document/basic.tex a/document/basic.tex
index 8f77d60..4fc8805 100644
--- b/document/basic.tex
+++ a/document/basic.tex
@@ -218,8 +218,7 @@ variables exported by a library; see
section~\ref{importsareimmutablesection}) is also
considered a syntax violation.
-If a top-level or library form in a program is not syntactically
-correct, then the implementation must raise an exception with
+If a syntax violation occurs, the implementation must raise an exception with
condition type {\cf\&syntax}, and execution of that top-level program
or library must not be allowed to begin.
@@ -313,7 +312,11 @@ An object fetched from a location, by a variable reference or by
a procedure such as {\cf car}, {\cf vector-ref}, or {\cf string-ref}, is
equivalent in the sense of \ide{eqv?} % and \ide{eq?} ??
(section~\ref{equivalencesection})
-to the object last stored in the location before the fetch.
+to the object last stored in the location before the fetch, except
+when that object is a procedure. When the object is a procedure, the
+object fetched from the location will also be a procedure that behaves
+identically to the procedure last stored in the location, but it is
+possible that it is not the same object.
Every location is marked to show whether it is in use.
No variable or object ever refers to a location that is not in use.
@@ -335,7 +338,6 @@ procedures listed in this report are mutable. An attempt to store a
new value into a location referred to by an immutable object
should raise an exception with condition type {\cf\&assertion}.
-
\section{Proper tail recursion}
\label{proper tail recursion}
diff --git b/document/bytevector.tex a/document/bytevector.tex
index b83c566..55e1b3e 100644
--- b/document/bytevector.tex
+++ a/document/bytevector.tex
@@ -132,7 +132,7 @@ It returns \schfalse{} otherwise.
\end{entry}
\begin{entry}{%
-\proto{bytevector-fill!}{ bytevector fill}}
+\proto{bytevector-fill!}{ bytevector fill}{procedure}}
\domain{The \var{fill} argument is as in the description of the {\cf
make-bytevector} procedure.}
@@ -163,7 +163,7 @@ and returns \unspecifiedreturn. Analogous to {\cf vector-fill!}.
The {\cf bytevector-copy!} procedure copies the bytes from \var{source} at indices
\begin{displaymath}
- \var{source-start}, \ldots \var{source-start} + \var{k} - 1
+ \var{source-start}, \ldots, \var{source-start} + \var{k} - 1
\end{displaymath}
to consecutive indices in \var{target} starting at \var{target-index}.
@@ -324,8 +324,8 @@ The \ldots{\cf -set!} procedures return \unspecifiedreturn.
integer objects in the interval $\{0, \ldots, 256^{\mathit{size}}-1\}$. For
{\cf sint-list->bytevector}, \var{list} must be a list of exact
integer objects in the interval $\{-256^{\mathit{size}}/2, \ldots,
- 256^{\mathit{size}}/2-1\}$. The length of \var{bytevector} or,
- respectively, of \var{list} must be divisible by \var{size}.}
+ 256^{\mathit{size}}/2-1\}$. The length of \var{bytevector}
+ must be divisible by \var{size}.}
These procedures convert between lists of integer objects and their consecutive
representations according to \var{size} and \var{endianness} in the
@@ -412,7 +412,7 @@ The \ldots{\cf -set!} procedures return \unspecifiedreturn.
object in
the interval $\{0, \ldots, 2^{32}-1\}$. For {\cf bytevector-s32-set!}
and {\cf bytevector-s32-native-set!}, \var{n} must be an exact
- integer object in the interval $\{-2^{31}, \ldots, 2^{32}-1\}$.}
+ integer object in the interval $\{-2^{31}, \ldots, 2^{31}-1\}$.}
These retrieve and set four-byte representations of numbers at indices $\var{k},
\ldots, \var{k}+ 3$, according to the endianness specified by \var{endianness}. The
@@ -456,7 +456,7 @@ The \ldots{\cf{}-set!} procedures return \unspecifiedreturn.
object in
the interval $\{0, \ldots, 2^{64}-1\}$. For {\cf bytevector-s64-set!}
and {\cf bytevector-s64-native-set!}, \var{n} must be an exact
- integer object in the interval $\{-2^{63}, \ldots, 2^{64}-1\}$.}
+ integer object in the interval $\{-2^{63}, \ldots, 2^{63}-1\}$.}
These retrieve and set eight-byte representations of numbers at
indices $\var{k}, \ldots, \var{k}+ 7$, according to the endianness
@@ -597,13 +597,14 @@ sequence is encoded by the given bytevector.
\proto{utf16->string}{ bytevector endianness}{procedure}
\pproto{(utf16->string \var{bytevector}}{procedure}}
{\tt\obeyspaces\\
- \var{endianness} \var{endianness-mandatory})}
+ \var{endianness} \var{endianness-mandatory?})}
\domain{\var{Endianness} must be the symbol {\cf big} or
the symbol {\cf little}.} The {\cf utf16->string} procedure returns
a newly allocated (unless empty) string whose character sequence is
-encoded by the given bytevector. \var{Bytevector} is decoded
-according to UTF-16BE or UTF-16LE: If \var{endianness-mandatory?} is
+encoded by the given bytevector. \var{Bytevector} is decoded according
+to UTF-16, UTF-16BE, UTF-16LE, or a fourth encoding scheme that differs from
+all three of those as follows: If \var{endianness-mandatory?} is
absent or \schfalse, {\cf utf16->string} determines the endianness
according to a UTF-16 BOM at the beginning of \var{bytevector} if a
BOM is present; in this case, the BOM is not decoded as a character.
@@ -624,13 +625,14 @@ encoding is decoded as a regular character.
\proto{utf32->string}{ bytevector endianness}{procedure}
\pproto{(utf32->string \var{bytevector}}{procedure}}
{\tt\obeyspaces\\
- \var{endianness} \var{endianness-mandatory})}
+ \var{endianness} \var{endianness-mandatory?})}
\domain{\var{Endianness} must be the symbol {\cf big} or
the symbol {\cf little}.} The {\cf utf32->string} procedure returns
a newly allocated (unless empty) string whose character sequence is
-encoded by the given bytevector. \var{Bytevector} is decoded
-according to UTF-32BE or UTF-32LE: If \var{endianness-mandatory?} is
+encoded by the given bytevector. \var{Bytevector} is decoded according
+to UTF-32, UTF-32BE, UTF-32LE, or a fourth encoding scheme that differs from
+all three of those as follows: If \var{endianness-mandatory?} is
absent or \schfalse, {\cf utf32->string} determines the endianness
according to a UTF-32 BOM at the beginning of \var{bytevector} if a
BOM is present; in this case, the BOM is not decoded as a character.
diff --git b/document/commands.tex a/document/commands.tex
index 6784eab..4df9f8a 100644
--- b/document/commands.tex
+++ a/document/commands.tex
@@ -9,12 +9,15 @@
\usepackage{makeidx}
\usepackage{hyperref}
+\usepackage{breakurl}
% \let\htmlonly=\iffalse
% \let\endhtmlonly=\fi
% \let\texonly=\iftrue
% \let\endtexonly=\fi
+\usepackage{cancel}
+
\makeatletter
\texonly
diff --git b/document/convio.tex a/document/convio.tex
index ecef355..c370c7d 100644
--- b/document/convio.tex
+++ a/document/convio.tex
@@ -14,7 +14,7 @@ associated implementation-dependent transcoders.
\rproto{eof-object?}{ obj}{procedure}}
These are the same as {\cf eof-object} and {\cf eof-object?} from the
-\rsixlibrary{ports} library.\schindex{eof-object}\schindex{eof-object?}
+\rsixlibrary{io ports} library.\schindex{eof-object}\schindex{eof-object?}
\end{entry}
\begin{entry}{%
diff --git b/document/enum.tex a/document/enum.tex
index 7b63527..7f1daf8 100644
--- b/document/enum.tex
+++ a/document/enum.tex
@@ -46,7 +46,7 @@ the universe of its argument, as an enumeration set.
Returns a unary procedure that, given a symbol
that is in the universe of \var{enum-set}, returns its 0-origin index
within the canonical ordering of the symbols in the universe; given a
-value not in the universe, the unary procedure returns \schfalse.
+symbol not in the universe, the unary procedure returns \schfalse.
\begin{scheme}
(let* ((e (make-enumeration '(red green blue)))
@@ -179,7 +179,8 @@ Projects \vari{enum-set} into the universe
of \varii{enum-set}, dropping any elements of \vari{enum-set} that do
not belong to the universe of \varii{enum-set}. (If \vari{enum-set}
is a subset of the universe of its second, no elements are
-dropped, and the injection is returned.)
+dropped, and the injection is returned.) The result has the enumeration type of
+\varii{enum-set}.
\begin{scheme}
(let ((e1 (make-enumeration
@@ -187,7 +188,7 @@ dropped, and the injection is returned.)
(e2 (make-enumeration
'(red black white))))
(enum-set->list
- (enum-set-projection e1 e2))))
+ (enum-set-projection e1 e2)))
\ev (red black)
\end{scheme}
\end{entry}
diff --git b/document/eval.tex a/document/eval.tex
index 68c13ab..0d841fb 100644
--- b/document/eval.tex
+++ a/document/eval.tex
@@ -1,7 +1,7 @@
\chapter{\tt{eval}}
\label{evalchapter}
-The \rsixlibrary{eval} library allows a program to create Scheme
+The \defrsixlibrary{eval} library allows a program to create Scheme
expressions as data at run time and evaluate them.
\begin{entry}{%
@@ -34,25 +34,27 @@ The bindings of the environment represented by the specifier are
immutable: If {\cf eval} is applied to an expression that is
determined to contain an
assignment to one of the variables of the environment, then {\cf eval} must
-raise an exception with a condition type {\cf\&assertion}.
+raise an exception with a condition type {\cf\&syntax}.
\begin{scheme}
(library (foo)
(export)
- (import (rnrs))
+ (import (rnrs)
+ (rnrs eval))
(write
(eval '(let ((x 3)) x)
(environment '(rnrs))))) \\\> {\it writes} 3
(library (foo)
(export)
- (import (rnrs))
+ (import (rnrs)
+ (rnrs eval))
(write
(eval
'(eval:car (eval:cons 2 4))
(environment
'(prefix (only (rnrs) car cdr cons null?)
- eval:))))) \\\> {\it writes} 2
+ eval:))))) \\\> {\it writes} 2%
\end{scheme}
\end{entry}
diff --git b/document/example.tex a/document/example.tex
index d076ed8..fd74cf8 100644
--- b/document/example.tex
+++ a/document/example.tex
@@ -149,7 +149,9 @@ which models a damped oscillator.
(newline)
(write (head s))
(loop (tail s)))))
- (loop the-states))%
+ (loop the-states))
+
+(close-output-port (current-output-port))%
\end{schemenoindent}
This prints output like the following:
diff --git b/document/exc.tex a/document/exc.tex
index 893bc13..5544540 100644
--- b/document/exc.tex
+++ a/document/exc.tex
@@ -2,7 +2,7 @@
\label{exceptionsconditionschapter}
Scheme allows programs to deal with exceptional situations using two
-cooperating facilities: The exception system for raising and handling
+cooperating facilities: the exception system for raising and handling
exceptional situations, and the condition system for describing these
situations.
@@ -54,13 +54,15 @@ raised the exception, not as a crash.
\proto{with-exception-handler}{ \var{handler} \var{thunk}}{procedure}}
\domain{\var{Handler} must be a procedure and should accept one argument.
-\var{Thunk} must be a procedure that accepts zero arguments.} The {\cf
+\var{Thunk} must be a procedure and should accept zero arguments.} The {\cf
with-exception-handler} procedure returns the results of invoking
-\var{thunk}. \var{Handler} is installed as the current
+\var{thunk} without arguments. \var{Handler} is installed as the current
exception handler for the dynamic extent (as determined by {\cf
dynamic-wind}) of the invocation of \var{thunk}.
\implresp The implementation must check the restrictions on
+\var{thunk} to the extent performed by applying it as described above.
+The implementation must check the restrictions on
\var{handler} to the extent performed by applying it as described
when it is called as a result of a call to {\cf raise} or {\cf
raise-continuable}.
@@ -81,7 +83,7 @@ before applying it.
\syntax
Each \hyper{cond clause} is as in the specification of {\cf cond}.
(See report section~\extref{report:cond}{Derived conditionals}.)
-{\cf \=>} and {\cf else} are the same as in the \rsixlibrary{base} library.
+{\cf =>} and {\cf else} are the same as in the \rsixlibrary{base} library.
\semantics
Evaluating a {\cf guard} form evaluates \hyper{body} with an exception
@@ -91,11 +93,11 @@ that binding evaluates the clauses as if they were the clauses of a
continuation and dynamic environment of the {\cf guard} expression. If every
\hyper{cond clause}'s \hyper{test} evaluates to \schfalse{} and there
is no {\cf else} clause, then
-{\cf raise} is re-invoked on the raised object within the dynamic
+{\cf raise-continuable} is invoked on the raised object within the dynamic
environment of the original call to {\cf raise} except that the current
exception handler is that of the {\cf guard} expression.
-The final expression in a \hyper{cond} clause is in a tail context if
+The final expression in a \hyper{cond clause} is in a tail context if
the {\cf guard} expression itself is.
\end{entry}
@@ -153,7 +155,7 @@ returns become the values returned by the call to
'error))
(raise
(condition
- (make-violation
+ (make-violation)
(make-message-condition "I am an error"))))
\ev \exception{\&violation}
@@ -331,8 +333,8 @@ of applying \var{proc} to that component.
(cond1? (condition foo)) \ev \schtrue
(real-cond1? (condition foo)) \lev \unspecified
(real-cond1? (condition foo bar)) \lev \schfalse
-(cond1-x (condition foo bar) \lev foo
-(cond2-y (condition foo bar) \lev bar
+(cond1-x (condition foo bar)) \lev foo
+(cond2-y (condition foo bar)) \lev bar