consp | ![]() |
Predicate if the expression is a cons cell, a not-empty list.
There are some possible definitions, all equally the same:
(defun CONSP (lst) (not (atom lst))) (defun CONSP (lst) (and lst (listp lst))) ;|#+ VLISP|; (setq CONSP vl-consp) ;|END #+ VLISP|; ;|#+ VILL|; (setq CONSP vlx-consp) ;|END #+ VILL|;
(consp nil) => nil (consp 1) => nil (consp '(0)) => T (consp '(0 . 1)) => T
In Visual Lisp it is builtin as VL-CONSP
, in Vital Lisp as VLX-CONSP
.
expr: any valid lisp expression
T or nil.
None.
(std-require 'STDINIT)
Defined in STDINIT, documented in STDLIST