|
From: | Joost Kremers |
Subject: | Re: Understanding the "let" construct and the setting of variables |
Date: | Thu, 17 Dec 2020 09:50:50 +0100 |
User-agent: | mu4e 1.5.7; emacs 27.1.50 |
On Thu, Dec 17 2020, steve-humphreys@gmx.com wrote: > I do not want the function to return the "message" (tah was for testing), but > the > value of tim_out. How can one return a local variable? `let` returns the return value of its last body form. So simply use your variable as the last body form. :-) ``` (let ((some-var (calculate-some-value))) (do-some-more-stuff-with some-var) some-var) ``` -- Joost Kremers Life has its moments
[Prev in Thread] | Current Thread | [Next in Thread] |