Talk:Lisp (programming language)

This is an old revision of this page, as edited by 203.37.81.xxx (talk) at 08:48, 21 September 2001 (removed obsolete quibbles about oldest programming language.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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)))