[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Closures - do you understand them well?
From: |
Michael Heerdegen |
Subject: |
Re: Closures - do you understand them well? |
Date: |
Fri, 09 Dec 2022 17:55:00 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Emanuel Berg <incal@dataswamp.org> writes:
> This is why you should never quote lambdas because if you do,
> you get the intuitive result:
>
> (let ((i 0)
> (funs '()))
> (while (< (setq i (1+ i))
> 4)
> (push `(lambda () ,i)
> funs))
> (apply #'+ (mapcar #'funcall funs))) ; 6
I think the intended goal was to see that shortcuts can cause trouble,
not to try to find a better shortcut...
Michael.
- Re: Closures - do you understand them well?, (continued)
- Re: Closures - do you understand them well?, Tassilo Horn, 2022/12/11
- Re: Closures - do you understand them well?, Emanuel Berg, 2022/12/10
- RE: [External] : Re: Closures - do you understand them well?, Drew Adams, 2022/12/10
- Iteration macros (was: [External] : Re: Closures - do you understand them well?), Stefan Monnier, 2022/12/10
- RE: Iteration macros (was: [External] : Re: Closures - do you understand them well?), Drew Adams, 2022/12/10
- Re: [External] : Re: Closures - do you understand them well?, Emanuel Berg, 2022/12/21
- Re: Closures - do you understand them well?, Emanuel Berg, 2022/12/08
- Re: Closures - do you understand them well?, Michael Heerdegen, 2022/12/08
- Re: Closures - do you understand them well?, tomas, 2022/12/08
- Re: Closures - do you understand them well?, Emanuel Berg, 2022/12/09
- Re: Closures - do you understand them well?,
Michael Heerdegen <=
- Re: Closures - do you understand them well?, Emanuel Berg, 2022/12/10
Re: Closures - do you understand them well?, Eric Abrahamsen, 2022/12/08
Re: Closures - do you understand them well?, Emanuel Berg, 2022/12/08