[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Defining functions within functions?
From: |
Eric Abrahamsen |
Subject: |
Re: Defining functions within functions? |
Date: |
Mon, 23 May 2016 13:34:45 +0800 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (gnu/linux) |
Marcin Borkowski <mbork@mbork.pl> writes:
> 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?
Sounds like a job for cl-labels!
Eric
- Defining functions within functions?, Marcin Borkowski, 2016/05/23
- Re: Defining functions within functions?,
Eric Abrahamsen <=
- Re: Defining functions within functions?, Michael Heerdegen, 2016/05/23
- Re: Defining functions within functions?, Marcin Borkowski, 2016/05/24
- Re: Defining functions within functions?, Marcin Borkowski, 2016/05/25
- Re: Defining functions within functions?, Stefan Monnier, 2016/05/25
- Re: Defining functions within functions?, Nicolas Petton, 2016/05/25
- Re: Defining functions within functions?, Marcin Borkowski, 2016/05/25