emacs-devel
[Top][All Lists]
Advanced

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

Re: Instead of pcase


From: Eli Zaretskii
Subject: Re: Instead of pcase
Date: Fri, 01 Dec 2023 18:33:12 +0200

> Date: Fri, 01 Dec 2023 17:04:09 +0100
> From:  Michael Heerdegen via "Emacs development discussions." 
> <emacs-devel@gnu.org>
> 
> (let ((hookfun #'my-hookfun)
>       (start 1) (end 99)
>       (collection (list "foo" "bar"))
>       (plist `((prop . val))))
> 
>   (pcase `(,hookfun . (,start ,end ,collection . ,plist))
>     (`(,hookfun . (,start ,end ,collection . ,plist))
>      (list hookfun start end collection plist))))
> ;; ==> (my-hookfun 1 99 ("foo" "bar") ((prop . val)))
> #+end_src
> 
> The `pcase' pattern is _literally_ identical to a `backquote' call used
> to create the same value.  Whatever problem you have with `pcase' also
> exists for backquote.

I don't have any problems with pcase.



reply via email to

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