From: Matthew Gingell (gingell@gnat.com)
Date: Wed Jul 18 2001 - 12:44:15 MDT
Eliezer S. Yudkowsky writes:
> In fact, I believe that LISP code effectively does this as well; LISP
> expressions may not be *extensible* tree structures (if you can cons
> another element onto '(plus 2 2) without breaking it, even under
> object-oriented Common LISP, I'd like to know how), but LISP expressions
> are most certainly tree structures and not Java VM or assembly. '(plus 2
> (plus 1 1)) sure looks like a tree structure to me.
What does "break" mean in this context and what are you trying to do?
In Emacs:
(defun plus (&rest args)
(apply '+ args)) => plus
(setq expression '(plus 2 2)) => (plus 2 2)
(cons 'whatever expression) => (whatever plus 2 2)
(eval expression) => 4
(list 1 expression 3) => (1 (plus 2 2) 3)
(list 1 (eval expression) 3) => (1 4 3)
(setq expression
(list '* expression expression)) => (* (plus 2 2) (plus 2 2))
(eval expression) => 16
This archive was generated by hypermail 2.1.5 : Sat Nov 02 2002 - 08:08:52 MST