Talk:Lisp (programming language)

This is an old revision of this page, as edited by CYD (talk | contribs) at 21:52, 14 April 2003. 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)))


I would insist to reintroduce "Lot of Insane and Stupid Parenthesis" somewhere this is a famous joke and has also its place in Wikipedia. Ericd 20:27 Apr 14, 2003 (UTC)

It is in there. Paragraph 2 of "Syntax". It's "Lots of Irritating Superfluous Parentheses", btw (sometimes also "Lots of Isolated Silly Parenthesis".) -- CYD