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: Richard Stallman
Subject: Re: pcase bindings in patterns with complicated logic
Date: Wed, 17 Jan 2024 22:37:53 -0500

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > cond* can do this without introducing a special feature for it:
  > >
  > >   (cond* ((match* `(2 ,c) (cdr '(1 2 3)))
  > >           (format "Match: %S" c)))

  > What about

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

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





reply via email to

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