[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Quick pcase question
From: |
Michael Heerdegen |
Subject: |
Re: Quick pcase question |
Date: |
Wed, 02 Mar 2016 13:27:20 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux) |
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> But the fact is that pcase is (very complex and very useful) syntax
> sugar. I just wrote a pcase clause that looks like:
>
> `((,(and f-string (pred stringp)) . ,(and class (pred symbolp)))
> . ,(and regexp (pred stringp)))
>
> And that's kind of awful. The whole point of pcase should be concision,
> but that looks pretty terrible.
:-P
Maybe separate the testing and the binding operations, like:
#+begin_src emacs-lisp
(and `((,(pred stringp) . ,(pred symbolp)) . ,(pred stringp))
`((,f-string . ,class ) . ,regexp))
#+end_src
Regards,
Michael.
- Quick pcase question, Eric Abrahamsen, 2016/03/02
- Re: Quick pcase question, Michael Heerdegen, 2016/03/02
- Re: Quick pcase question, Eric Abrahamsen, 2016/03/02
- Re: Quick pcase question, Michael Heerdegen, 2016/03/02
- Re: Quick pcase question, Eric Abrahamsen, 2016/03/02
- Re: Quick pcase question,
Michael Heerdegen <=
- Re: Quick pcase question, Phillip Lord, 2016/03/02
- Re: Quick pcase question, Eric Abrahamsen, 2016/03/02
- Re: Quick pcase question, Stefan Monnier, 2016/03/02
- Re: Quick pcase question, Phillip Lord, 2016/03/02
- Re: Quick pcase question, Eric Abrahamsen, 2016/03/02
- Re: Quick pcase question, Phillip Lord, 2016/03/03
Re: Quick pcase question, Phillip Lord, 2016/03/02