[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Scheme-reports] Formal definitions [con'd]


    I went up with reading the formal definitions of R7RS.

- p. 72, the definition of the auxiliary macro "guard-aux"; the 5th  
clause reads:

((guard-aux reraise (test)) test)

    It seems to me that the correct expansion should be:

((guard-aux reraise (test)) (or test reraise))

- p. 70, "define-values"; the 1st clause

((define-values () expr) ...)

seems to me to be useless, "define-values" cannot be used with an  
empty list of variables, and no recursive call yields this situation;

- p. 71, "make-parameter": your definition accepts any positive number  
of arguments with :

(define (make-parameter init . o) ...)

Why not using "case-lambda", for "make-parameter" as well as its  
result? That is,

(define make-parameter
   (let ((make-parameter-aux
          (lambda (init converter)
            (let ((value (converter init)))
               (() value)
               ((control) (if (eq? control <param-convert>)
                              (error "bad parameter syntax")))
               ((control value-0) (if (eq? control <param-set!>)
                                      (set! value value-0)
                                      (error "bad parameter syntax"))))))))
      ((init) (make-parameter-aux init values))
      ((init converter) (make-parameter-aux init converter)))))



This message was sent using IMP, the Internet Messaging Program.

Scheme-reports mailing list