[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Generic functions: Specializers like `or' or `memq'?
From: |
Michael Heerdegen |
Subject: |
Generic functions: Specializers like `or' or `memq'? |
Date: |
Wed, 03 Nov 2021 18:17:11 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Hello,
I come back to this question again and again, so it's time to just ask:
Often I want to use a certain method implementation for several very
similar cases and want to avoid code duplication, but I don't know how
to express this using the existing method specializers.
For example, I want the `head' spec to match one of several symbols who
are synonymous. Or instead of (eql SYM) I would rather want
(memq (SYMS...)). Or I want to combine several SPECS using `or' because
the implementation is the same.
Am I'm missing something or - this is not possible currently, right?
Would it be possible to implement such stuff then?
TIA,
Michael.