Restricting the procedures to proper lists Olin Shivers (06 Jul 1999 00:31 UTC)
Re: Restricting the procedures to proper lists Sergei Egorov (06 Jul 1999 17:45 UTC)

Re: Restricting the procedures to proper lists Sergei Egorov 06 Jul 1999 17:44 UTC

Olin Shivers writes:
> For me, the current BIG QUESTION is this: some list-processing procedures
> do not always examine the whole list -- such as the procedures that search
> lists, like FIND, MEMBER, etc. Suppose we decide to restrict these
> procedures to proper lists. What is the spec going to be for invocations
> where the procedure never examines the whole list, and so cannot see the
> terminator? ...

I believe that the right thing to do is to stick with RNRS "it is an error"
wording. Some implementations have different "modes" of compilation,
allowing one to choose between optimization for speed or better error
checking. I think that NULL-LIST? deserves the same treatment: the
library should left unspecified what happens when NULL-LIST? is
applied to non-nil atoms.

Regards,
Sergei

P.S. I also think that the specification for LAST, LIST-COPY
TAKE-RIGHT, TAKE-RIGHT!,  DROP-RIGHT, and  DROP-RIGHT!
should be tightened to exclude dotted lists.