Some LISP expressions evaluate to themselves (examples are MIT-Scheme REPL, though GNU Common Lisp agrees):
1 ]=> 3
;Value: 3
And are in normal form. Evaluation of an expression (such as (+ 2 1)
) thus can properly be said to be conversion to normal form. That's nice, because that's how I've always understood evaluation formally.
But with lists we're in trouble:
1 ]=> (list 3 2)
; Value 16: (3 2)
1 ]=> (3 2)
;The object 3 is not applicable.
;To continue, call RESTART with an option number:
; (RESTART 2) => Specify a procedure to use in its place.
; (RESTART 1) => Return to read-eval-print level 1.
Am I right in thinking that:
- (many[0]) LISPs don't have normal forms for (non-empty) lists, and
- (many) LISPs do not have the property that evaluation is reduction to normal form?
If so, isn't this somewhat at odds with formalisms in PLT such as abstract rewriting systems? What alternative formalisms do capture evaluation in LISPs?
[0] Or perhaps more accurately, "most of the prominent LISPs", such as CL, Clojure, and Scheme. But I'd be interested in less well-known counter-examples!