emacs-devel
[Top][All Lists]
Advanced

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

Re: pcase bindings in patterns with complicated logic


From: Ihor Radchenko
Subject: Re: pcase bindings in patterns with complicated logic
Date: Thu, 18 Jan 2024 13:13:20 +0000

Richard Stallman <rms@gnu.org> writes:

>   > (pcase '(1 2 3)
>   >   ((and `(1 . ,_)
>   >    (app cdr `(2 ,c)))
>   >      (format "Match: %S" c)))
>
> That uss, once again, the construct `app'.  pcse can do this
> but needs a special feature to do it.
>
> The point is that cond* can do this without the need of a special
> extra feature.

My question was whether cond* can be used to implement an equivalent
match as in my example above. AFAIU, cond* cannot match against multiple
values at once.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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