emacs-devel
[Top][All Lists]
Advanced

[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.



reply via email to

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