
On 18 Mar 2008, at 11:08, Leslie P. Polzer wrote:
Dear Gary,
doesn't leave much room for options. Are you thinking of something like
(defmacro my-case ((it &key test key) &body clauses) ...)
so that it would look like
(my-case (thing :test 'foo) (<case1> <form1>) ... )
Yes, something like that. Of course, the best solution would consist of being able to say just
(case thing :test #'equal (<case1> <form1>) (...))
but I believe the macro lamda list syntax won't let us.
That's not an issue: (defmacro case (thing &body body) ...) ...and do the parsing of body manually inside the macro. For example, defmethod and define-method-combination have to do that as well. In case of case (ha!), the parsing should be easy: What follows after thing is either :test or a cons, that's easy to distinguish. Pascal -- 1st European Lisp Symposium (ELS'08) http://prog.vub.ac.be/~pcostanza/els08/ Pascal Costanza, mailto:pc@p-cos.net, http://p-cos.net Vrije Universiteit Brussel, Programming Technology Lab Pleinlaan 2, B-1050 Brussel, Belgium