139 lines
4.2 KiB
HTML
139 lines
4.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
|
|
<!Originally converted to HTML using LaTeX2HTML 95 (Thu Jan 19 1995) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
|
|
<HEAD>
|
|
<TITLE> Appendix: Selected Lisp primitives</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<meta name="description" value=" Appendix: Selected Lisp primitives">
|
|
<meta name="keywords" value="lp">
|
|
<meta name="resource-type" value="document">
|
|
<meta name="distribution" value="global">
|
|
<P>
|
|
<BR> <HR>
|
|
<A HREF="node73.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A>
|
|
<A HREF="lp.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A>
|
|
<A HREF="node71.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <BR>
|
|
<A HREF="lp.html"><B>Contents</B></A>
|
|
<B> Next:</B>
|
|
<A HREF="node73.html"> * (FUNCTION)</A>
|
|
<B>Up:</B>
|
|
<A HREF="lp.html">Lisp Primer</A>
|
|
<B> Previous:</B>
|
|
<A HREF="node71.html"> Defmacro</A>
|
|
<BR> <HR> <P>
|
|
<H1> Appendix: Selected Lisp primitives</H1>
|
|
<P>
|
|
Entries are described as FUNCTIONS, PREDICATES, MACROS, or SPECIAL FORMS.
|
|
<P>
|
|
FUNCTIONS evaluate all their arguments and return a value.
|
|
<P>
|
|
PREDICATES are functions that always return either t or nil.
|
|
<P>
|
|
MACROS and SPECIAL FORMS do not always evaluate all their arguments.
|
|
<P>
|
|
Currently approximately 40 Lisp primitives are documented here. Eventually just over 100 primitives will be documented.
|
|
<P>
|
|
We adopt the convention of using angle brackets <tt> < > </tt> to indicate where appropriate text should be inserted when using these primitives; the examples should make this clear.
|
|
<P>
|
|
In many of the descriptions below, the notion of list is used when either a list or a Lisp data type known as the dotted pair would be acceptable. Beginners generally need not use dotted pairs, so they are ignored for the sake of simplicity here.
|
|
<P>
|
|
|
|
<P>
|
|
<BR> <HR>
|
|
<UL>
|
|
<LI>
|
|
<A HREF="node73.html"> * (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node74.html"> + (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node75.html"> - (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node76.html"> 1+, 1- (FUNCTIONS)</A>
|
|
<LI>
|
|
<A HREF="node77.html"> = (PREDICATE)</A>
|
|
<LI>
|
|
<A HREF="node78.html"> <, > , <=, >= (PREDICATES)</A>
|
|
<LI>
|
|
<A HREF="node79.html"> and (MACRO)</A>
|
|
<LI>
|
|
<A HREF="node80.html"> append (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node81.html"> apply (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node82.html"> atom (PREDICATE)</A>
|
|
<LI>
|
|
<A HREF="node83.html"> butlast (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node84.html"> car (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node85.html"> caar, cadr, cdar, cddr, etc. (FUNCTIONS)</A>
|
|
<LI>
|
|
<A HREF="node86.html"> cdr (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node87.html"> cond (MACRO)</A>
|
|
<LI>
|
|
<A HREF="node88.html"> cons (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node89.html"> defun (MACRO)</A>
|
|
<LI>
|
|
<A HREF="node90.html"> do (SPECIAL FORM)</A>
|
|
<LI>
|
|
<A HREF="node91.html"> documentation (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node92.html"> eql, equal (PREDICATES)</A>
|
|
<LI>
|
|
<A HREF="node93.html"> eval (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node94.html"> evenp, oddp (PREDICATES)</A>
|
|
<LI>
|
|
<A HREF="node95.html"> first (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node96.html"> if (SPECIAL FORM)</A>
|
|
<LI>
|
|
<A HREF="node97.html"> length (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node98.html"> let (SPECIAL FORM)</A>
|
|
<LI>
|
|
<A HREF="node99.html"> list (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node100.html"> listp (PREDICATE)</A>
|
|
<LI>
|
|
<A HREF="node101.html"> mapcar (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node102.html"> max, min (FUNCTIONS)</A>
|
|
<LI>
|
|
<A HREF="node103.html"> member (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node104.html"> not (PREDICATE)</A>
|
|
<LI>
|
|
<A HREF="node105.html"> nth (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node106.html"> nthcdr (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node107.html"> null (PREDICATE)</A>
|
|
<LI>
|
|
<A HREF="node108.html"> numberp (PREDICATE)</A>
|
|
<LI>
|
|
<A HREF="node109.html"> or (MACRO)</A>
|
|
<LI>
|
|
<A HREF="node110.html"> read (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node-rest.html"> rest (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node111.html"> reverse (FUNCTION)</A>
|
|
<LI>
|
|
<A HREF="node112.html"> second, third, etc. (FUNCTIONS)</A>
|
|
<LI>
|
|
<A HREF="node113.html"> setf (MACRO)</A>
|
|
<LI>
|
|
<A HREF="node114.html"> symbolp (PREDICATE)</A>
|
|
<LI>
|
|
<A HREF="node115.html"> y-or-n-p, yes-or-no-p (PREDICATES)</A>
|
|
</UL>
|
|
<BR> <HR>
|
|
<P>
|
|
<ADDRESS>
|
|
<I>© Colin Allen & Maneesh Dhagat <BR>
|
|
March 2007 </I>
|
|
</ADDRESS>
|
|
</BODY>
|