Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

cdr

cdr

type: function (subr) 
location: built-in
source file: xllist.c
Common LISP compatible: yes
supported on: all machines

SYNTAX

(cdr <expr> )
        <expr>          -       a list or list expression

DESCRIPTION

CDR returns the remainder of a list or list expression after first element of the list is removed. If the list is NIL, NIL is returned.

EXAMPLES

(cdr '(a b c))                          ; returns (B C)
(cdr '((a b) c d))                      ; returns (C D)
(cdr NIL)                               ; returns NIL
(cdr 'a)                                ; error: bad argument type
(cdr '(a))                              ; returns NIL
(setq ben '(a b c))                     ; set up variable BEN
(cdr ben)                               ; returns (B C)


Go to the first, previous, next, last section, table of contents.