help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: pcase on multiple conditions


From: Emanuel Berg
Subject: Re: pcase on multiple conditions
Date: Sun, 30 Oct 2022 13:58:11 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Stefan Monnier via Users list for the GNU Emacs text editor wrote:

>> (let ((my-number (read-number "Number: ")))
>>   (pcase my-number
>>     ((or 3 4) (message "Yes, it is 3 or 4"))
>>     (t (message "Not 3 or 4")))) ⇒ "Not 3 or 4" for entry of 5
>>
>> So why this does not work?
>
> It works for me (and it helpfully gives me a warning along
> the way that "Pattern t is deprecated. Use `_' instead").

`pcase'! I thought we were talking `pcase-let'.

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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