blob: b799ce13a0132a2196d028e71721d1c8667fed0e (
plain)
1
2
3
4
5
6
|
<h4 class="subsection">Function Type</h4> <p>Lisp functions are executable code, just like functions in other programming languages. In Lisp, unlike most languages, functions are also Lisp objects. A non-compiled function in Lisp is a lambda expression: that is, a list whose first element is the symbol <code>lambda</code> (see <a href="lambda-expressions">Lambda Expressions</a>). </p> <p>In most programming languages, it is impossible to have a function without a name. In Lisp, a function has no intrinsic name. A lambda expression can be called as a function even though it has no name; to emphasize this, we also call it an <em>anonymous function</em> (see <a href="anonymous-functions">Anonymous Functions</a>). A named function in Lisp is just a symbol with a valid function in its function cell (see <a href="defining-functions">Defining Functions</a>). </p> <p>Most of the time, functions are called when their names are written in Lisp expressions in Lisp programs. However, you can construct or obtain a function object at run time and then call it with the primitive functions <code>funcall</code> and <code>apply</code>. See <a href="calling-functions">Calling Functions</a>. </p><div class="_attribution">
<p class="_attribution-p">
Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
<a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Function-Type.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Function-Type.html</a>
</p>
</div>
|