[Home]LISP programming language/Talk

HomePage | LISP programming language | Recent Changes | Preferences


Function CAR in LISP program returns the first element in a list.

   (car '(a b c d))
   Returns a
Function CDR would return everything but the first element in a list.
   (cdr '(a b c d))
   returns (b c d)
There are of course many variations of this.
   (cadr '(a b c d))
   Returns b
Working from the inside out is the same as (car (cdr '(a b c d)))


HomePage | LISP programming language | Recent Changes | Preferences
This page is read-only | View other revisions
Last edited September 21, 2001 4:48 pm by 203.37.81.xxx (diff)
Search: