[R6RS] Splitting hairs over `map' and friends

Michael Sperber sperber at informatik.uni-tuebingen.de
Tue Aug 15 07:54:10 EDT 2006

William D Clinger <will at ccs.neu.edu> writes:

> 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 ...))))
>          '()
>          '()
>          '())

While I agree with the general point, I don't understand what you're
saying with the example.  The procedure still takes three
arguments---surely we don't want to include the case where the
procedure, after having been successfully called, raises any kind of

Now, do we require that it is a procedure, without any arity checking,
if the lists are empty?

Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla

More information about the R6RS mailing list