emacs.d/clones/lisp/colinallen.dnsalias.org/lp/node7.html

53 lines
1.9 KiB
HTML
Raw Normal View History

2022-08-02 12:34:59 +02:00
<!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> Some Primitive Functions</TITLE>
</HEAD>
<BODY>
<meta name="description" value=" Some Primitive Functions">
<meta name="keywords" value="lp">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
<BR> <HR>
<A HREF="node8.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A>
<A HREF="node2.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A>
<A HREF="node6.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="node8.html"> Constructors: ConsList, </A>
<B>Up:</B>
<A HREF="node2.html"> LISt Processing</A>
<B> Previous:</B>
<A HREF="node6.html"> Lists</A>
<BR> <HR> <P>
<H1> Some Primitive Functions</H1>
<P>
Functions that are built into the Lisp language are called ``primitive functions.'' There are (of course) lots of primitive functions in Lisp, including all the math functions you would expect. Here's a list of some of the more common math functions:
<P>
+, -, *, /, exp, expt, log, sqrt, sin, cos, tan, max, min.
<P>
You should look at the appendix entries for these functions and play with them to learn how they work.
<P>
More important to the list-processing identity of Lisp are the
primitive functions that allow selection from lists and construction
of lists. The important constructor functions are cons, list, and
append. The two principal selector functions are first and rest.
<P>
<BR> <HR>
<UL>
<LI>
<A HREF="node8.html"> Constructors: Cons, List, and Append</A>
<LI>
<A HREF="node9.html"> Quote</A>
<LI>
<A HREF="node10.html"> Selectors: First and Rest</A>
</UL>
<BR> <HR>
<P>
<ADDRESS>
<I>&#169; Colin Allen &amp; Maneesh Dhagat <BR>
March 2007 </I>
</ADDRESS>
</BODY>