help-gnu-emacs
[Top][All Lists]
Advanced

[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 20:40:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

<tomas@tuxteam.de> writes:

> So I learnt something from the riddle, after all [1].

Cool that there was something to learn for some people.

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.


> [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.

Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]