Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!cmcl2!husc6!mit-eddie!glenn From: glenn@mit-eddie.MIT.EDU (Glenn Meader) Newsgroups: comp.lang.lisp Subject: Macros for the elementary lithp programmer Message-ID: <4455@mit-eddie.MIT.EDU> Date: Tue, 6-Jan-87 21:21:16 EST Article-I.D.: mit-eddi.4455 Posted: Tue Jan 6 21:21:16 1987 Date-Received: Wed, 7-Jan-87 00:39:17 EST Organization: MIT EE/CS Computer Facility, Cambridge, MA Lines: 11 Posting-Front-End: GNU Emacs 18.33.2 of Fri Dec 12 1986 on eddie (berkeley-unix) Could someone who is not offended by the triviality of this question please tell me how to test things inside a defmacro definition. By the way I use Common Lisp. Example: (defmacro foo(&rest body)) I want this form to translate to (/ body) if (oddp (car body)) and to (* body) if (evenp (car body)). This example is only to demonstrate a principle. My LISP, when given (foo 2 3 4), complains that '2 is a bad function. Also is there a more appropriate group for this type of elementary question? Thanks.