[Top][All Lists]

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

Re: Predicate for true lists

From: Basil L. Contovounesios
Subject: Re: Predicate for true lists
Date: Fri, 06 Jul 2018 01:31:26 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Paul Eggert <address@hidden> writes:

> Basil L. Contovounesios wrote:
>> OK, but my question still stands: do we use the term "proper" only to
>> name this function, but keep existing references to "true" lists in the
>> manual?  Or do we systematically switch from "true" to "proper"
> I suggest the latter. I've often heard them called "proper lists", and the
> phrase "true list" is less common in my experience.

I attach three patches (and a benchmark).  The first introduces the
function proper-list-length as per your suggestion in
(please check whether I have properly attributed you, as I am unfamiliar
with the preferred way of doing this).

The second changes the Elisp manual to refer to "proper lists" instead
of "true lists".

The third moves the definition of zerop in lisp/subr.el from under the
'List functions' heading to under the 'Basic Lisp functions' heading.

Finally, here are the updated (byte-compiled) benchmark results:

      proper   (0.004452047000000001 0 0.0)
      dotted   (0.005584044999999999 0 0.0)
      circular (0.006193915          0 0.0)
      proper   (0.06397756299999999  0 0.0)
      dotted   (0.063610087          0 0.0)
      circular (0.09455345899999999  0 0.0)
      proper   (0.29080201899999997  0 0.0)
      dotted   (0.290801063          0 0.0)
      circular (0.433813842          0 0.0)




Attachment: 0001-Add-convenience-function-proper-list-length.patch
Description: Add convenience function proper-list-length

Attachment: 0002-Refer-to-proper-lists-instead-of-true-lists.patch
Description: Refer to "proper lists" instead of "true lists"

Attachment: 0003-Rearrange-definition-of-zerop-in-subr.el.patch
Description: Rearrange definition of zerop in subr.el

Attachment: bench.el
Description: Benchmark for proper-list-length

reply via email to

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