[R6RS] Splitting hairs over `map' and friends

William D Clinger will at ccs.neu.edu
Tue Aug 15 07:11:58 EDT 2006


Mike wrote:
> We say that `map' must accept a procedure of as many arguments as
> there are list arguments to `map'.  (By virtue of R5RS saying "must".)
> Is an implementation required to check this even if the argument
> list(s) is/are empty?

No.  It is *impossible* for an implementation to check
this safely using only the operations specified in
R5RS or (so far) R6RS.  Consider, for example:

    (map (lambda (x . rest)
           (cond ((null? rest) <ok1>)
                 ((null? (cdr rest)) <ok2>)
                 (else (error ...))))
         '()
         '()
         '())

Will



More information about the R6RS mailing list