[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Another question about lambdas
From: |
Arash Esbati |
Subject: |
Re: Another question about lambdas |
Date: |
Tue, 13 Dec 2022 12:26:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 |
Michael Heerdegen <michael_heerdegen@web.de> writes:
> it seems you didn't notice that you participated in a quiz!
I think I grasped that, I've obviously missed the rule "No clarifying
questions allowed" ;-)
>> > What's the result of the following expression - and why? Or maybe
>> > it is invalid?
>> >
>> > #+begin_src emacs-lisp
>> > (let* ((x 'l)
>> > (f (lambda () x))
>> > (x 'd))
>> > (funcall f))
>> > #+end_src
>
>> With lexical or with dynamic binding?
>
> "With lexical or with dynamic binding?" is the correct answer to the
> question.
So here another one for you: What's the result of this expression under
lexical binding?
(let (_)
(defvar x)
(let* ((x 'l)
(f (lambda () x))
(x 'd))
(funcall f)))
Best, Arash
- Re: Another question about lambdas, (continued)
- Re: Another question about lambdas, Emanuel Berg, 2022/12/10
- Re: Another question about lambdas, Arash Esbati, 2022/12/10
- Re: Another question about lambdas, Michael Heerdegen, 2022/12/10
- Re: Another question about lambdas, Michael Heerdegen, 2022/12/10
- Re: Another question about lambdas, tomas, 2022/12/11
- Re: Another question about lambdas, Michael Heerdegen, 2022/12/11
- Re: Another question about lambdas, tomas, 2022/12/12
- Re: Another question about lambdas, Michael Heerdegen, 2022/12/12
- Re: Another question about lambdas,
Arash Esbati <=
- Re: Another question about lambdas, Michael Heerdegen, 2022/12/13
Re: Another question about lambdas, Gregory Heytings, 2022/12/10