[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Instead of pcase
From: |
Yuri Khan |
Subject: |
Re: Instead of pcase |
Date: |
Fri, 1 Dec 2023 14:07:40 +0700 |
On Fri, 1 Dec 2023 at 13:32, Eli Zaretskii <eliz@gnu.org> wrote:
> Incidentally, the actual code from which this were taken is
>
> (`(,hookfun . (,start ,end ,collection . ,plist))
>
> Which has _two_ periods, not one, which are AFAIU redundant, as far as
> the Lisp reader is concerned.
The first period and the parentheses are redundant but they are
helpful because they emphasize that the first element and the rest of
the list come from different places.
The second period is not redundant. It causes the (,start ,end
,collection . ,plist) to match any list of 3+ elements and the ,plist
binding to receive the remainder. Without the period, (,start ,end
,collection ,plist) would only match a list of exactly 4 elements, and
,plist would bind to the fourth.
Maybe you are implying ,x is equivalent to (\, x) and so `(,hookfun .
(,start ,end ,collection . ,plist)) could be written `((\, hookfun)
(\, start) (\, end) (\, collection) \, plist). To me, that would be…
point-less?
- Re: Instead of pcase, (continued)
- Re: Instead of pcase, Eli Zaretskii, 2023/12/01
- Re: Instead of pcase, Michael Heerdegen, 2023/12/01
- Re: Instead of pcase, Eli Zaretskii, 2023/12/01
- Re: Instead of pcase, Alan Mackenzie, 2023/12/01
- Re: Instead of pcase, Michael Heerdegen, 2023/12/02
- Re: Instead of pcase, Emanuel Berg, 2023/12/02
- Re: Instead of pcase, Richard Stallman, 2023/12/03
- Re: Instead of pcase, Richard Stallman, 2023/12/02
Re: Instead of pcase, Eli Zaretskii, 2023/12/01
- Re: Instead of pcase,
Yuri Khan <=
- Re: Instead of pcase, Eli Zaretskii, 2023/12/01
- Re: Instead of pcase, Andreas Schwab, 2023/12/01
- Re: Instead of pcase, Richard Stallman, 2023/12/03
- Re: Instead of pcase, Eli Zaretskii, 2023/12/04
- Re: Instead of pcase, Lynn Winebarger, 2023/12/04
- Re: Instead of pcase, Eli Zaretskii, 2023/12/04
- Re: Instead of pcase, Andreas Schwab, 2023/12/04
- Re: Instead of pcase, Richard Stallman, 2023/12/06
- Re: Instead of pcase, Andreas Schwab, 2023/12/07
- Re: Instead of pcase, Richard Stallman, 2023/12/08