Article View: comp.lang.scheme.c
Article #149remove from mailing list
From: Major
Date: Tue, 26 Feb 1991 04:22
Date: Tue, 26 Feb 1991 04:22
43 lines
1604 bytes
1604 bytes
[sorry about answering this to the list, my mail bounced]
walter@vlsivie.tuwien.ac.at writes:
> Does anybody know how to handle varable-argument-lists for MACROS
> for MIT-Scheme Vers. 7.1 ?
The short answer is
(lambda x ...)
as opposed to
(lambda (x) ...)
To work your example:
> The following sim macro is only working on PC-SCHEME
>
> (macro sim
> (lambda (e) (list 'simulate (list 'quote (cdr e)))))
>
> It is possible to call this macro with a variable argument list
>
> (sim a b c)
> => (a b c)
>
> How could this be done for MIT SCHEME Ver 7.1 ??
(syntax-table-define system-global-syntax-table 'sim
(macro e
`(simulate ',e)))
Major
+--------------------------------------------------+------------------------+
| Domain: major@pta.oz.au | Phone: + 61 9 474-2600 |
| UUCP: {uunet,hplabs,ukc}!munnari!pta.oz.au!major | Fax: + 61 9 474-1221 |
| Mail: Box T1680 GPO, Perth WA 6001, Australia | |
+--------------------------------------------------+------------------------+
The meek shall inherit the earth: the rest of us will escape to the stars!
Technical Details
Message-ID:
<9102260442.29183@munnari.oz.au>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-linesShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: major@pta.OZ.AU (Major) Newsgroups: comp.lang.scheme.c Subject: remove from mailing list Message-ID: <9102260442.29183@munnari.oz.au> Date: 26 Feb 91 04:22:24 GMT Sender: major@pta.oz.au Organization: The Internet Lines: 43