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.

first

first

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

SYNTAX

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

DESCRIPTION

FIRST returns the first element of the expression. If the first expression is itself a list, then the sublist is returned. If the list is NIL, NIL is returned.

EXAMPLES

(first '(a b c))                        ; returns A
(first '((a b) c d))                    ; returns (A B)
(first NIL)                             ; returns NIL
(first 'a)                              ; error: bad argument type
(setq children '(amanda ben))           ; set up variable CHILDREN
(first children)                        ; returns AMANDA


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