[r6rs-discuss] Minor error in (rnrs records syntactic) examples

Jed Davis r6rs at jdev.users.panix.com
Wed Jun 6 15:40:09 EDT 2007


If someone's already reported this and I somehow missed it, please
forgive the noise.

In section 6.3 of the libraries report, under "Any definition that takes
advantage of implicit naming", this example protocol (used thrice):

  (lambda (c) (c (make-widget n)))

seems incorrect; it should, I presume, be:

  (lambda (c) (lambda (n) (c (make-widget n))))

Not only is n free in the first one, but the protocol must be a
procedure returning a procedure -- the spec under (rnrs records
procedural) says only that it "should" be such, but I fail to see
how the resulting constructor-descriptor could be extended if a
non-procedure is returned.

(Granted, contexts can exist where the first protocol is well-behaved,
but that's rather beside the point of providing a helpful example.)

-- 
(let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map
((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l))))))  (lambda
(f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l))
(C k)))))))    '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))



More information about the r6rs-discuss mailing list