Errata for the JFP version of R6RS

Revised6 Report on the Algorithmic Language Scheme

§ 1.13
The description of the example program mentions procedures get-bytes-all and put-bytes, which should be get-bytevector-all and put-bytevector.
§: 5.10
The sentence

"An object fetched from a location, by a variable reference or by a procedure such as car, vector-ref, or string-ref, is equivalent in the sense of eqv? (section 11.5) to the object last stored in the location before the fetch."

should be amended by:

", 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."

§ 11.3
The description of the procedures is out of order and should be:

"equal, monotonically increasing, monotonically nondecreasing, monotonically decreasing, or monotonically nonincreasing"

There is an occurrence of the name fl< which should be fl<?
§ 11.4.5
The first example for case is slightly confusing, as it suggests that 1 is a composite number: It should be elided from the second branch of the case.
§ 11.5
In the definition of the behavior of eqv? on inexact numbers - both #t and #f cases - the phrase

" [...] as a finite composition of Scheme's standard arithmetic procedures."

should be augmented by:

", as long as the evaluation of that application does not involve NaN."

The following sentence should be elided:

"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 11.4.1."

The following example for eq?
(eq? car car) => #t
should be replaced by
(eq? car car) => unspecified
§ 11.6
In the entry for list-ref, "list-tail" should be replaced by "list-ref".
The note for string->number should be replaced by:

"If the arguments to string->number are a string and a valid radix as specified, it must produce a number object or #f ; it may not raise an exception."

(I.e., string->number may raise an exception if the argument is not a string.)

§ 11.7.4
The entry for rationalize says "returns a the a number object": the "the" should be elided.
§ 11.9
The wording for the second bullet for vector patterns says "F is a vector of n or more elements", but should say "F is a vector of n elements".

The sentence at the end of the entry for append should be clarified to:

"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."

Standard Libraries

§ 2.6
In the entry for bytevector-s32-native-set!, the interval for n should be {-231, ..., 231 - 1} instead of {-231, ..., 232 - 1}.
§ 2.7
In the entry for bytevector-s64-native-set!, the interval for n should be {-263, ..., 263 - 1} instead of {-263, ..., 264 - 1}.
§ 2.9
In the entry for utf16->string utf32->string, the argument endianness-mandatory should be spelled endianness-mandatory?.
§ 6.1
The sentence

"Each call to a record constructor returns a new record with a fresh location [...]"

should be replaced by:

"Each call to a record constructor of a mutable record type returns a new record with a fresh location [...]"

The sentence

If obj1 and obj2 are both records of the same record type, and are the results of two separate calls to record constructors, then eqv? returns #f.

should be replaced by:

If obj1 and obj2 are both records of the same mutable record type, and are the results of two separate calls to record constructors, then eqv? returns #f.

§ 11.2
In the code specifying the computation for fxbit-count, "ei" should be "fx".
In the code specifying the computation for fxbit-set?, fx>= should be fx>=?.
§ 12.1
The remark "An algebra that defines how marks and substitutions work more precisely is given in section~2.4 of Oscar Waddell's PhD thesis." is somewhat misleading and should be qualified as follows:

"Note, however, that Waddell's thesis describes slightly different semantics for bound-identifier=? - it specifies that for two identifiers to be equal in the sense of bound-identifier=?, they must have the same marks and be equal in the sense of free-identifier=?, whereas this report requires instead that they must have the same marks and have the same name."

§ 12.6
The example definition of the include macro uses
(open-file-input-port fn)
to open the file, which would result in a binary input port. Instead, a textual input port should be opened, for example via:
(open-file-input-port fn (file-options) (buffer-mode block) (native-transcoder))
§ 12.8
The sample definition of identifier-syntax is incorrect and should be as follows:
(define-syntax identifier-syntax
  (lambda (x)
    (syntax-case x (set!)
      [(_ e)
       #'(lambda (x)
           (syntax-case x ()
             [id (identifier? #'id) #'e]
             [(_ x (... ...)) #'(e x (... ...))]))]
      [(_ (id exp1) ((set! var val) exp2))
       (and (identifier? #'id) (identifier? #'var))
       #'(make-variable-transformer
          (lambda (x)
            (syntax-case x (set!)
              [(set! var val) #'exp2]
              [(id x (... ...)) #'(exp1 x (... ...))]
              [id (identifier? #'id) #'exp1])))])))
§ 14
There's an extra parenthesis at the end of the code example for enum-set-projection.