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.

last

last

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

SYNTAX

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

DESCRIPTION

The LAST function returns a list containing the last node or element of a list. If the last node is a sub-list, this is returned unaffected.

EXAMPLES

(last NIL)                              ; returns NIL
(last 'a)                               ; error: bad argument type
(last '(A))                             ; returns (A)
(last '(A B C D E))                     ; returns (E)
(last '( A (B C) (D E (F))))            ; returns ((D E (F)))
                                        ;       
(setq children '(junie vicki            ;
                 cindy chris))          ;
(last children)                         ; returns CHRIS


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