Functions
=========
A "function" is a Lisp object which, when applied to a sequence of
argument values, produces another value--the function's "result". It
may also induce side-effects (e.g. changing the environment of the
calling function). All Lisp functions return results -- there is
nothing like a procedure in Pascal.
Note that special forms (Note:Special Forms) and macros (Note:Macros) are _not_ functions since they do not guarantee to evaluate
all of their arguments.
Functions are the main building-block in Lisp programs, each program
is usually a system of interrelated functions.
There are two types of function: "primitive functions" are functions
written in the C language, these are sometimes called built-in
functions, the object containing the C code itself is called a "subr".
All other functions are defined in Lisp.
- Function: functionp object
Returns true if OBJECT is a function (i.e. it can be used as the
function argument of `funcall'.
(functionp set)
=> t
(functionp setq)
=> ()
(functionp (lambda (x) (+ x 2)))
=> t
- Function: subrp arg
Returns true is ARG is a primitive subroutine object.
- Function: subr-name subr
Returns a string naming the primitive subroutine SUBR.