[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Lisp Question

I have noticed the following behavior with respect to the scope of local 
variables, their initialization, and their destructive modification.  In the 
following example, the function foo behaves differently on the second run.  
Obviously, the memory containing foos initialization is being modified.  I also 
assume this in not a bug in MCL.  Could someone direct be to the portion of 
Steels lisp book (2nd edition) which refers to this behavior.  Also, what 
should happen if foo were loaded from a compiled file.

? (defun foo ()
    (let ((ted '(1 2 3)))
      (print ted)
      (rplacd ted 'bill)
      (print ted)))
? (FOO)

(1 2 3) 
(1 . BILL) 
(1 . BILL)
? (FOO)

(1 . BILL) 
(1 . BILL) 
(1 . BILL)

Second question, I remember hearing about a company which offered a translator 
from Lisp to C.  Any info on this company or product (in particular, an 
internet address).

Thanks in advance!