help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Appending lists


From: Stefan Monnier
Subject: Re: Appending lists
Date: Wed, 16 Jun 2021 10:22:23 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

tomas@tuxteam.de [2021-06-16 09:28:19] wrote:
> Doing (foo x y) will *never* change "the variable x" -- unless
> foo is a macro/special form.

Just to show that you should never say never:

    (let* ((x 5)
           (y 6))
      (cl-flet ((foo (a b) (setq x (+ a b) y (* a b)) (- a b)))
        (list (foo x y) x y)))

returns

    (-1 11 30)


;-)


        Stefan "helpfully muddying the water"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]