Alan Crowe <alan@cawtech.freeserve.co.uk> wrote:
+---------------
| aburry@ieee.org writes:
| > Is it fair to say that eval is the opposite of quote?
...
| > Is there another function considered the opposite of quote?
...
| Type 2<RET>
|
| The lisp interpreter looks at 2 and evaluates it. It
| recognises it as a number, and applies the rule that numbers
| evaluatie to themselves, so the answer is 2.
|
| Type: (+ 2 2)<RET>
|
| The computer sees the opening parenthesis and realises it is
| being given a list. When it reaches the closing parenthesis
| it is able to work out that it has seen a list of three items.
| The first is the + sign, so it knows to add together the values
| of the remaining items on the list. So it evaluates them, the
| number 2 having the value 2 as before. Answer: 4
+---------------
CLHS "3.1.2.1 Form Evaluation" is sometimes useful at this point:
http://www.alu.org/HyperSpec/Body/sec_3-1-2-1.html
Forms fall into three categories: symbols, conses, and
self-evaluating objects. The following sections explain these
categories.
3.1.2.1.1 Symbols as Forms
3.1.2.1.2 Conses as Forms
3.1.2.1.3 Self-Evaluating Objects
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607