emacs-devel
[Top][All Lists]
Advanced

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

lists, plain conses and length


From: T.V Raman
Subject: lists, plain conses and length
Date: Thu, 3 Sep 2020 19:23:34 -0700 (PDT)

Ran into this while trying to distinguish a cons from a list:

Try this:

(setq a (cons 1 2)) => (1 . 2)
(consp a) => t
(listp a) => t
(length a)=> Debugger entered--Lisp error: (wrong-type-argument listp 2)

Q: how does one distinguish a cons from a list.
The error  message for length may need fixing since it says the
argument passed to it is not a list (it's correct) but then listp is wrong?
-- 
♉ Id: kg:/m/0285kf1  🦮

-- 
♉ Id: kg:/m/0285kf1  🦮

-- 
♉ Id: kg:/m/0285kf1  🦮



reply via email to

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