[R6RS] Splitting hairs over `map' and friends

William D Clinger will at ccs.neu.edu
Tue Aug 15 09:18:17 EDT 2006


Mike wrote:
> While I agree with the general point, I don't understand what you're
> saying with the example.  The procedure still takes three
> arguments

The point is that the map procedure cannot call its
first argument to determine experimentally whether
it accepts three arguments.  For one thing, the map
procedure has no clue what kind of arguments would
be acceptable.  Secondly, the procedure might have
some kind of nasty side effect, such as an exception.

> ---surely we don't want to include the case where the
> procedure, after having been successfully called, raises any kind of
> exception.

Yet that is my interpretation of the R5RS language.
In the R5RS, "raising an exception" is the same as
signalling an error, which may be done in a way that
some people would describe as crashing.

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

Yes.  If we didn't require that, then the type of the
first argument to map would have to be object, and 
the specification of map would have to say explicitly
that it raises an exception if the first argument is
not a procedure and the lists are non-empty.  That's
way too much baggage for a corner case.

Will



More information about the R6RS mailing list