[alexandria-devel] DESTRUCTURE-CLAUSES - alexandria_destruct#9CF676.diff (1/1)
Nikodemus Siivola
nikodemus at random-state.net
Thu Apr 26 08:41:54 UTC 2012
On 25 April 2012 16:47, Tobias C Rittweiler <tcr at freebits.de> wrote:
> I was pleased to discover that DESTRUCTURING-CASE made it into
> Alexandria meanwhile. Very nice! This allows me to share the
> little gem that I'm attaching with this posting. It's a handy
> macro to make writing macros like DEFPACKAGE, DEFGENERIC of
> DEFREADTABLE easy like a breeze.
Nice!
Unless I misread this, duplicate clauses cause the earlier one to be
discarded? Signaling an error instead might be better, though a fairly
common pattern might also be served by special casing clauses of the
form
(:keyword &append stuff)
or something like that, which would cause duplicate clauses to have
their contents merged.
Or maybe that should be factored into a separate function MERGE-ALIST,
for preprocessing the clauses?
function MERGE-ALIST keys alist &optional (merge #'append)
...or something along those lines?
Cheers,
-- Nikodemus
More information about the alexandria-devel
mailing list