From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: `thunk-let'? Date: Mon, 09 Oct 2017 00:25:01 +0200 Message-ID: <8760bp9t1e.fsf@web.de> References: <87infp9z6j.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1507501599 716 195.159.176.226 (8 Oct 2017 22:26:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 8 Oct 2017 22:26:39 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) Cc: Nicolas Petton , Stefan Monnier To: Emacs Development Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 09 00:26:35 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1K1m-0007U6-EU for ged-emacs-devel@m.gmane.org; Mon, 09 Oct 2017 00:26:30 +0200 Original-Received: from localhost ([::1]:55309 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1K1u-0001AV-08 for ged-emacs-devel@m.gmane.org; Sun, 08 Oct 2017 18:26:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1K0a-0000i7-2l for emacs-devel@gnu.org; Sun, 08 Oct 2017 18:25:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1K0U-0006T7-RJ for emacs-devel@gnu.org; Sun, 08 Oct 2017 18:25:15 -0400 Original-Received: from mout.web.de ([212.227.15.4]:57809) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1K0U-0006SB-HF for emacs-devel@gnu.org; Sun, 08 Oct 2017 18:25:10 -0400 Original-Received: from drachen.dragon ([92.74.174.244]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lgs1W-1dWur32UQ2-00oIJh; Mon, 09 Oct 2017 00:25:03 +0200 In-Reply-To: <87infp9z6j.fsf@web.de> (Michael Heerdegen's message of "Sun, 08 Oct 2017 22:12:20 +0200") X-Provags-ID: V03:K0:L9Qnoqku2pN50QW7IzzBiTh0dSVCAyFWJqAQ3trrDLvyvnS2hmP DO3W7hHf0Dl1QCCx/MxLUoByNtCqeGcztqN350qXGlzS4ZRbWPCl5pxBckR1+cRNoXCEytu 7Rj56hQ1hGsFMRGEAG/jfkm7s6nZE2RwyJrhIxiVXmteynWgGuXSS2MDqc+lwNt7AF0mhOL u/6VduWmGS7IvR4x/KnjQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:NDOf30vIYWA=:kDPC7M9ARWL824axGd9a0h Y9eC2V0KUlEWNTAf+N7Tg0MYbb8d/kkBynucGHD9ME7oDC2wTL4hLypHJqXpUjKKPSzxo/vt6 2d7ky5S+q/gWAmaPgZw6W/Tvv3jZcbEDl071aIg/EK6IJ429S+1zUClTNmtsr9nCAaEGUuAD8 eF0RU1C7Wq0YtRj4U2R/JJAY2+iOxsobRoNVX3j8c1cRJnBmw84eIhecazn1rNDt7pwrx/qAJ uEEQNj294J3i8iz5bG2gWmt0/yR/gre6DeEt7RIBWa2MUwy9OeZIY+Tnk4loLAK60vUCKFbR2 vhOM8qlRNBeIbQEVmvaMVKSMH5zLE/yU+8kYxLbu335v9n9LHdNQ7vX860MDnwrPDThkjStQ2 22doAOAjPP9lqMb4xonOJbvwzdAfIk/kvbAQDBoSTCrn+MDcmONEVOKU2bx80Q7b0sU2ZqK+N 75h4Oy0tSZcwT+3cITwO+LFe78p18ghxUFmcbHdz/K2xvxxxivS/nSPA2S3W+K3Vtzin/A5yt 75fLCmi2tt3os4AMxQD2hyScEHIcbObAFT6XqoEJrf5pHFkOW/Vct4YkfHf/U/caM/gTpEh/k y6dZapQ7MBdQ0NWcAlb9fQxDVGXmp/60jKKpudmx0Y+1InUMbAytXRVUEd4LWwQtZ9axTRKEp Eqt0c0z86Vl0/tPvHt3voctSonLVNzEzJvmzCXZWm8fA9gtOvNNLE5SDpATT7AIxK7nT4CGId nQ3SvK1qqtk4tUDRQERonGPNjldRtNgfuq2oiBNss4jlt+DxmHwzM65yJ6HHs0gE8gYelLTp X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.4 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219274 Archived-At: Michael Heerdegen 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.