[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Closures - do you understand them well?
From: |
tomas |
Subject: |
Re: Closures - do you understand them well? |
Date: |
Fri, 9 Dec 2022 20:50:14 +0100 |
On Fri, Dec 09, 2022 at 08:40:50PM +0100, Michael Heerdegen wrote:
> <tomas@tuxteam.de> writes:
>
> > So I learnt something from the riddle, after all [1].
>
> Cool that there was something to learn for some people.
It was enjoyable, yes :)
> The second part of the exercise is now of course (this goes to
> everyone): how to "fix" the code so that what some people expected is
> the end result?...:
>
> Write an expression that returns a list of 100 functions accepting zero
> arguments. `funcall'ing the Nth function must return N. Use a `while'
> loop or whatever you like but please not `dolist' or any tool that
> already handles this "problem" specifically.
Hm. I imagine in the middle of my code "fred's function factory", like
so:
(defun fred-s-function-factory (n)
...)
(i won't tell more now ;)
> > [1] The most general rule seems still to be: "all generalisations
> > suck"
>
> I think this is the first instance of Russell's paradox I have ever met
> in real life.
Then I would like you to meet my barber...
Cheers
--
t
signature.asc
Description: PGP signature
- RE: [External] : Re: Closures - do you understand them well?, (continued)
- RE: [External] : Re: Closures - do you understand them well?, Tomas Hlavaty, 2022/12/09
- Re: [External] : Re: Closures - do you understand them well?, Emanuel Berg, 2022/12/10
- Re: [External] : 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
- Re: [External] : Re: Closures - do you understand them well?, Emanuel Berg, 2022/12/15
- Re: Closures - do you understand them well?, tomas, 2022/12/08
- Re: Closures - do you understand them well?, Michael Heerdegen, 2022/12/09
- Re: Closures - do you understand them well?,
tomas <=
- Re: Closures - do you understand them well?, Tassilo Horn, 2022/12/09
- Re: Closures - do you understand them well?, Michael Heerdegen, 2022/12/09
- Re: Closures - do you understand them well?, Emanuel Berg, 2022/12/10
- Re: Closures - do you understand them well?, Emanuel Berg, 2022/12/10
- Re: Closures - do you understand them well?, tomas, 2022/12/10
- Re: Closures - do you understand them well?, Michael Heerdegen, 2022/12/11
- Re: Closures - do you understand them well?, tomas, 2022/12/12
- Re: Closures - do you understand them well?, Michael Heerdegen, 2022/12/12
- Re: Closures - do you understand them well?, Emanuel Berg, 2022/12/22
- Re: Closures - do you understand them well?, tomas, 2022/12/23