[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Instead of pcase
From: |
Michael Heerdegen |
Subject: |
Re: Instead of pcase |
Date: |
Fri, 17 Nov 2023 09:02:11 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
> If it does,
It doesn't. Was very tired yesterday without being aware of it. Sorry
again for the confusion I caused.
> then the node "Destructuring with pcase Patterns" Needs
> Workâ˘, because if you try to compare this fragment from
> completion-at-point:
>
> (pcase res
> (`(,_ . ,(and (pred functionp) f)) (funcall f))
> (`(,hookfun . (,start ,end ,collection . ,plist))
The subpattern
(and (pred functionp) f)
contains of course more syntactical elements: `and', a `pred' test, and
a variable used for binding. Which means: This matches anything
fulfilling `functionp' and binds the variable `f' to the element at that
position.
Michael.
- Instead of pcase, Richard Stallman, 2023/11/15
- Re: Instead of pcase, Dmitry Gutov, 2023/11/16
- Re: Instead of pcase, T.V Raman, 2023/11/16
- Re: Instead of pcase, Philip Kaludercic, 2023/11/16
- Re: Instead of pcase, T.V Raman, 2023/11/16
- Re: Instead of pcase, Richard Stallman, 2023/11/17
- Re: Instead of pcase, Michael Heerdegen, 2023/11/19
- Re: Instead of pcase, Barry Fishman, 2023/11/19
- Re: Instead of pcase, Dmitry Gutov, 2023/11/19
- Re: Instead of pcase, Eric Abrahamsen, 2023/11/19
- Re: Instead of pcase, Stefan Monnier, 2023/11/24