Adds an element to the beginning of a list, or constructs a dotted list
(cons new-first-element list-or-atom)
Arguments
Element to be added to the beginning of a list. This element can be an atom or a list.
A list or an atom.
Return Values
cons returns that list with new-first-element added as the first item in the list. If list-or-atom is an atom, cons returns a dotted pair consisting of new-first-element and list-or-atom.
The value returned depends on the data type of list-or-atom. If list-or-atom is a list,Examples
Command: (cons 'a '(b c d))
(A B C D)
Command: (cons '(a) '(b c d))
((A) B C D)
Command: (cons 'a 2)
(A . 2)
List Handling topic in the AutoLISP Developer's Guide.
The