blob: cb7ff2100f5e5cf5cddaabe54c9f5baebf8f1b54 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
<h4 class="subsection">Evaluation Notation</h4> <p>A Lisp expression that you can evaluate is called a <em>form</em>. Evaluating a form always produces a result, which is a Lisp object. In the examples in this manual, this is indicated with ‘<samp>⇒</samp>’: </p> <div class="example"> <pre class="example">(car '(1 2))
⇒ 1
</pre>
</div> <p>You can read this as “<code>(car '(1 2))</code> evaluates to 1”. </p> <p>When a form is a macro call, it expands into a new form for Lisp to evaluate. We show the result of the expansion with ‘<samp>→</samp>’. We may or may not show the result of the evaluation of the expanded form. </p> <div class="example"> <pre class="example">(third '(a b c))
→ (car (cdr (cdr '(a b c))))
⇒ c
</pre>
</div> <p>To help describe one form, we sometimes show another form that produces identical results. The exact equivalence of two forms is indicated with ‘<samp>≡</samp>’. </p> <div class="example"> <pre class="example">(make-sparse-keymap) ≡ (list 'keymap)
</pre>
</div><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/Evaluation-Notation.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Evaluation-Notation.html</a>
</p>
</div>
|