[alexandria-devel] multiple values in switch clauses
Nikodemus Siivola
nikodemus at random-state.net
Sat Jan 26 14:10:42 UTC 2013
On 22 November 2012 10:02, Marco Baringer <mb at bese.it> wrote:
>
> hi,
>
> i'd like switch to, just like case and typecase do, allow multiple
> values in the 'value' position of the condition:
>
> (switch (foo)
> ((bar baz) ...))
>
> So the attached patch checks for the key form being a cons and, if so,
> expands into a (member value :test test) instead of (test value)
> form. Of course, this means that your key values can no longer be
> forms, so this may break existing code. I don't have any code which
> actually uses a function call in the value form of the clause (and a
> quick grep over my locally installed lisp libs shows nobody else does
> either), so i'm ok with the change, but i can understand if others
> don't agree.
I think I like the idea of a multiple-value-switch, but I'm constantly
(well, every 6 months) to remove switch and rewrite it, so I'm a bit
hesitant to add more features to it...
Thinking about this. Feel free to kick me to remind me.
Cheers,
-- Nikodemus
More information about the alexandria-devel
mailing list