[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67611: [PATCH] Add a Pcase pattern `cl-lambda` equivalent to `cl-des
From: |
João Távora |
Subject: |
bug#67611: [PATCH] Add a Pcase pattern `cl-lambda` equivalent to `cl-destructuring-bind` |
Date: |
Wed, 17 Jan 2024 09:12:07 +0000 |
On Wed, Jan 17, 2024 at 3:29 AM Richard Stallman <rms@gnu.org> wrote:
> Could you tell me more concretely what this proposed feature would
> look like in use? Perhaps with an example including context?
Many examples in the patch, have you looked?
> pcase does not use lambda lists, and neither does cond*.
Pcase it extensible for any object structure the user may
think of you can think of. This proposal is an extension.
Here's an example
(pcase some-mistery-object
((cl-arglist (42 &key a b c)) ; this proposal
(message "Oh, it starts it 42 and has c=%s" c))
(`(,_ ,x ,_)
(message "Boring three-element list with middle %s" x))
(`[,_ ,x ,_]
(message "Fancy vector with middle %s" x))
((franklinboing (nixneez)) ; my data-structure
(message "This franklinboing has some nice nixneez %s=" nizneez)))
João
- bug#67611: [PATCH] Add a Pcase pattern `cl-lambda` equivalent to `cl-destructuring-bind`, (continued)