setf not working

Willem Broekema metawilm at gmail.com
Thu Oct 3 07:40:43 UTC 2013


On Thu, Oct 3, 2013 at 8:48 AM, Didier Verna <didier at lrde.epita.fr> wrote:

> Basically, after a (defvar *var*), there
> are times when (setq *var* '(0 0)) doesn't work (the previous value of
> *var* remains in effect).
>

I guess you are modifying the value of *var*, which is not allowed if it is
a quoted list. That's why you need e.g. (list .. ..) or (copy-tree '(..
..)) instead of '(.. ..).
http://stackoverflow.com/questions/10365470/modifying-a-list-passed-as-a-parameter-gives-different-results-in-sbcl-and-clisp

- Willem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/pro/attachments/20131003/f1d0b3d9/attachment.html>


More information about the pro mailing list