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: Thierry Volpiatto
Subject: Re: pcase bindings in patterns with complicated logic
Date: Sun, 14 Jan 2024 07:27:39 +0000

Thierry Volpiatto <thievol@posteo.net> writes:

> I guess there is other examples in documentation that are mismatching
> with the actual behavior of pcase or are just confusing like this one in
> "11.4.4 Destructuring with ‘pcase’ Patterns":
>
>        (pcase my-list
>          (`(add ,x ,y)  (message "Contains %S and %S" x y)))
>
> I guess this example has been added before the pattern `add` exists.
> Here `add` is a symbol like any other symbol and has no particular
> meaning but it is confusing for reader that has not completely
> integrated previous sections (I would use `foo` instead).

For this example, sorry I confuse `add` and `app` (proof it is confusing
:-)).

> [ BTW I don't understand why `add` pattern exists as long as now `pred` is
> supporting an extra arg ]

Here read `app` instead of `add`.

-- 
Thierry



reply via email to

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