emacs-devel
[Top][All Lists]
Advanced

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

Re: Predicate for true lists


From: Paul Eggert
Subject: Re: Predicate for true lists
Date: Sat, 7 Jul 2018 01:41:38 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

Eli Zaretskii wrote:
the documentation still doesn't say that 'length' signals
an error for anything that is not a sequence, which is what
proper-list-p is relying on.

The proposed implementation of proper-list-p does not rely on such a signal, because it invokes 'length' only on nil and conses, and a cons must be either a proper list, a dotted list, or a circular list. Since the 'length' documentation specifies behavior in all these cases, the proposed implementation of proper-list-p does not need the 'length' documentation to also say that 'length' signals an error for non-sequences. (Perhaps it is a good idea to add such documentation for other reasons, but that's a different matter.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]