Hi. I'm a newbie to Common Lisp, and I'm using GNU Clisp. In working through a tutorial on CLOS, I set up a simple class and an instance:
Code:
(defclass rect () (l w))
(setf rect-a (make-instance 'rect))
One of the exercises challenged me to create a setter function, using with-slots. So, I wrote this:
Code:
(defun set-rect-values (rect l w)
(with-slots ((l-old l) (w-old w))
rect
(setf 'l-old l)
(setf 'w-old w)))
But I get this error when trying to use it:
Code:
> (set-rect-values rect-a 2 2)
*** - SLOT-VALUE: The slot L of #<RECT #x0003348AC408> has no value
Please advise.