[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
historical question about CASE
- To: SOLEY@xx.lcs.mit.edu
- Subject: historical question about CASE
- From: Barry Margolin <barmar@Think.COM>
- Date: Fri, 5 Jun 87 16:59 EDT
- Cc: common-lisp@sail.stanford.edu, Sandra J Loosemore <sandra%orion@cs.utah.edu>
- In-reply-to: <SOLEY.12308143452.BABYL@XX.LCS.MIT.EDU>
Date: Fri, 5 Jun 1987 16:11 EDT
From: SOLEY@xx.lcs.mit.edu
(defmacro do-something (thing &key allow-list ignore-list complain-list)
`(case ,thing
(,allow-list (frob-thing ,thing))
(,ignore-list nil)
(,complain-list (error "I won't frob ~S!" ,thing))))
Silly Programmer, hacks are for kids. That's no reason.
(defmacro do-something (thing &key allow-list ignore-list complain-list)
(append `(case ,thing)
(if allow-list `((,allow-list (frob-thing ,thing))))
.. etc ..
))
I don't know about you, but I find mine much easier to read.
barmar