From: Jeff Berger
Subject: Re: setqing equations
Date: 
Message-ID: <BERGER.91Oct23132401@pride.cs.uchicago.edu>
In article <············@dalembert.cs.widener.edu> ····@cs.widener.edu (Sven Heinicke) writes:

   Path: midway!ncar!zaphod.mps.ohio-state.edu!wupost!ukma!widener!news
   From: ····@cs.widener.edu (Sven Heinicke)
   Newsgroups: comp.lang.lisp
   Date: 23 Oct 91 15:12:16 GMT
   Organization: Widener University Department of Computer Science, Chester PA
   Lines: 14


   Is there anyway to get something like this to work:

   > (setq equation '(mod a b))
   (* mod a b)
   > (let ((a 20)(b 7)) (eval equation))
   6

   and I can't use a setq on a and b.
   Sorry if this is a dumb question.

   -- 
   ····@cs.widener.edu                                  Widener CS system manager
   Sven Mike Heinicke                                          and Student


I'm not sure why you want to do the above. A macro will do the job for
you though.

<cl> (defmacro equation () '(mod a b))

EQUATION 
<cl> :res

<cl> (let ((a 20) (b 7)) (equation))

6 

--
Jeff Berger			|USmail:	Ryerson 256
······@cs.uchicago.edu	        |		Artificial Intelligence Lab
PH: (312) 702-8584		|		1100 East 58th Street
FX: (312) 702-8487              |               Chicago, IL  60637