GNU Info

Info Node: (emacs-lisp-intro.info)cons

(emacs-lisp-intro.info)cons


Next: nthcdr Prev: car & cdr Up: car cdr & cons
Enter node , (file) or (file)node

`cons'
======

   The `cons' function constructs lists; it is the inverse of `car' and
`cdr'.  For example, `cons' can be used to make a four element list
from the three element list, `(fir oak maple)':

     (cons 'pine '(fir oak maple))

After evaluating this list, you will see

     (pine fir oak maple)

appear in the echo area.  `cons' puts a new element at the beginning of
a list; it attaches or pushes elements onto the list.

Build a list
length
How to find the length of a list.

automatically generated by info2www version 1.2.2.9