[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Another question about lambdas
From: |
Michael Heerdegen |
Subject: |
Re: Another question about lambdas |
Date: |
Sun, 11 Dec 2022 01:38:12 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Gregory Heytings <gregory@heytings.org> writes:
> > (let* ((x 'l)
> > (f (lambda () x))
> > (x 'd))
> > (funcall f))
> I think the following is clearer:
>
> (let ((x 'l))
> (let ((f (lambda () x)))
> (let ((x 'd))
> (funcall f))))
Yes, I think so too.
It was a question for this only 98% serious (and 2% funny) kind of quiz,
so I tried to obfuscate a bit what is going on. OTOH using let* I could
add the implicit question about how shadowing works in `let*' - that
question had been asked just some days ago, so I guess I couldn't
withstand.
Your form is better to demonstrate the binding aspect.
Michael.
- Re: Another question about lambdas, (continued)
- 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, 2022/12/13
- Re: Another question about lambdas, Michael Heerdegen, 2022/12/13
Re: Another question about lambdas, Gregory Heytings, 2022/12/10
- Re: Another question about lambdas,
Michael Heerdegen <=