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: Emanuel Berg
Subject: Re: Closures - do you understand them well?
Date: Fri, 09 Dec 2022 04:43:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Michael Heerdegen wrote:

>> In ELisp, both `dotimes` and `dolist` create a new binding
>> for `i` at each iteration of the loop.
>
> This is probably what most people expect from a loop.
> `cl-loop' doesn't.
>
> I guess it's not good to rely on either behavior of built-in
> looping constructs.

OK, so is it the closures? Or the loops?

Or ... the lamdas?

(setq x 111)

(setq f (lambda () x))

(funcall f)

(setq x 222)

(funcall f)

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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