On Fri, 4 Feb 2000, PILCH Hartmut wrote:
> Can anybody post a Standard Scheme Macro that does what SETQ of Common
> Lisp does?
On January, 20th you had already brought up this topic, which can be
verified at the guile mailing list archive at
After that, a lot of discussion of the whole topic went on. One of the
first posts (by Michael Livshin on January 20th) gave _two_ alternative
macro implementations of setq for guile.
I take the freedom to quote his code, which, however, I did not try for
(defmacro setq (var val)
(let ((tname (gensym)))
`(let ((,tname ,val))
(set! ,var ,tname)
(use-syntax (ice-9 syncase))
((setq var val)
(let ((tmp val))
(set! var tmp)
Also, the aspect of scheme being a functional language (or not) and
reasons for why set! is defined the way it is has been discussed in that
I expect people to follow the discussions they initiate.