multiple values in switch clauses
Marco Baringer <mb <at> bese.it>
2012-11-22 08:02:02 GMT
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.
--
-marco
_______________________________________________
alexandria-devel mailing list
alexandria-devel <at> common-lisp.net
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/alexandria-devel