emacs-devel
[Top][All Lists]
Advanced

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

Re: `thunk-let'?


From: Michael Heerdegen
Subject: Re: `thunk-let'?
Date: Mon, 09 Oct 2017 00:25:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux)

Michael Heerdegen <address@hidden> writes:

> I then realized that doing this should be trivial thanks to
> `cl-symbol-macrolet': instead of binding the original variables, you
> bind the expressions - wrapped inside `thunk-delay' - to helper vars.
> Then, you `symbol-macrolet' all original variables to a `thunk-force' of
> the according helper variable:

One limitation of that way of implementation would of course be that you
can't set the bound variables in the BODY, e.g. this would not work:

#+begin_src emacs-lisp
(thunk-let ((a (+ 1 2)))
  (setq a (1+ a))
  a)
#+end_src


Michael.



reply via email to

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