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.

nthcdr

nthcdr

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

SYNTAX

(nthcdr <expr> <list-expr> )
        <expr>          -       an integer expression
        <list-expr>     -       a list or list expression

DESCRIPTION

NTHCDR returns the <expr>'th CDR of <list-expr>. If the <list-expr> is shorter than <expr>, a NIL is returned. The counting sequence is base zero - the first element is the 0th element.

EXAMPLES

(nthcdr 4 '(0 1 2 3 4 5 6))             ; returns (4 5 6)
(nthcdr 3 '(a b))                       ; returns NIL
                                        ;
(nthcdr 4 'a)                           ; error: bad argument type


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