emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [External] : Re: Is this a bug in while-let or do I missunderstand i


From: Drew Adams
Subject: RE: [External] : Re: Is this a bug in while-let or do I missunderstand it?
Date: Sat, 9 Nov 2024 22:53:46 +0000

I said:

> In particular, it wouldn't hurt to show an
> example of what each can expand to, in terms
> of let[*] etc. We do that in the Elisp manual
> when introducing cond, for example:
>
>   For example: (if A B C)  ≡ (cond (A B) (t C))
>
> (We could even usefully do it to show let* in terms of let.)

Took me a moment to find it, but I asked this in
the thread of bug #73853, trying to point out that
it's not obvious what the behavior/meaning is:

> > (if-let ((a (does-an-a-exist?-then-return-it)))
> >     (use a)
> >   (do-something-else))
> 
> Is that the same as this?
> 
> (let ((a (does-an-a-exist?-then-return-it)))
>   (if a (use a) (do-something-else)))
> 
> > (and-let* ((a (an-a-exists))
> >            (b (b-depending-on-a-also-exists)))
> >   (test-using a b))
> 
> Is that the same as this?
> 
> (let* ((a (an-a-exists))
>        (b (b-depending-on-a-also-exists)))
>   (and a b (test-using a b)))
> 
> or this?
> 
> (let* ((a (an-a-exists))
>        (b (and a (b-depending-on-a-also-exists))))
>   (and b (test-using a b)))
> 
> or something else?

I really don't know, and haven't really tried to
find out (unfair, I know), other than by asking
the question there (to which there was no reply).

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73853#109

reply via email to

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