home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / lisp / 3180 < prev    next >
Encoding:
Text File  |  1993-01-06  |  925 b   |  28 lines

  1. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!spool.mu.edu!olivea!charnel!sifon!CC.UMontreal.CA!kardank
  2. From: kardank@ERE.UMontreal.CA (Kardan Kaveh)
  3. Newsgroups: comp.lang.lisp
  4. Subject: macro question
  5. Message-ID: <1993Jan7.040552.27087@cc.umontreal.ca>
  6. Date: 7 Jan 93 04:05:52 GMT
  7. Sender: news@cc.umontreal.ca (Administration de Cnews)
  8. Organization: Universite de Montreal
  9. Lines: 17
  10.  
  11. I would like to define a macro which in turn defines several functions.
  12. For example:
  13.  
  14. (defmacro a (x y)
  15.   `(defun ,x () (+ 2 2))
  16.   `(defun ,y () (* 2 3)))
  17.  
  18. As it stands, the macro only defines the second function, since that is the
  19. returned value.  How can I get both functions defined?
  20.  
  21. Thanks.
  22.  
  23. -- 
  24. ------------
  25. Kaveh Kardan                                       kaveh@taarna.UUCP
  26. Systeme Taarna                                     kardank@eole.umontreal.qc.ca
  27. Montreal Quebec Canada                             (514)844-8448
  28.