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 don't know what problem you are trying to solve in this way. But,
a macro will do the job for you. If you're using common lisp, for
example:
<cl> (defmacro equation () '(mod a b))
EQUATION
<cl> (let ((a 20) (b 7)) (equation))
6
<cl>
-Jeff
--
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