emacs-devel
[Top][All Lists]
Advanced

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

RE: Predicate for true lists


From: Drew Adams
Subject: RE: Predicate for true lists
Date: Mon, 4 Jun 2018 19:57:31 -0700 (PDT)

>From (elisp) `Cons Cells':

 Also by convention, the CDR of the last cons cell in a list is ‘nil’.
 We call such a ‘nil’-terminated structure a “true list”. ... For
 convenience, the symbol ‘nil’ is considered to have ‘nil’ as its CDR
 (and also as its CAR).

That just says: (null (cdr (last xs))), which is
(and list  (nthcdr (1- (safe-length xs)) xs))).



reply via email to

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