[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Defining functions within functions?
From: |
Marcin Borkowski |
Subject: |
Defining functions within functions? |
Date: |
Mon, 23 May 2016 07:13:43 +0200 |
User-agent: |
mu4e 0.9.16; emacs 25.1.50.1 |
Hi all,
I have a long function with quite a few (even nested) lambdas inside.
I decided to refactor it so that it becomes more readable. Since I use
lexical scoping, simply changing the lambdas into defuns defined
elsewhere won't work.
In Scheme, one would probably use define inside another define. Is it
a good idea to use a (cl-)defun within a defun in Elisp to obtain
a closure in this situation? If not, what is a better way?
TIA,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
- Defining functions within functions?,
Marcin Borkowski <=