home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 64 6f 63 75 6d 65 6e | 74 73 74 79 6c 65 7b 61 |\documen|tstyle{a|
|00000010| 72 74 69 63 6c 65 7d 0a | 0a 0a 5c 64 65 66 5c 73 |rticle}.|..\def\s|
|00000020| 63 68 74 72 75 65 7b 5c | 68 62 6f 78 7b 7b 5c 74 |chtrue{\|hbox{{\t|
|00000030| 74 20 5c 23 74 7d 7d 7d | 0a 5c 64 65 66 5c 73 63 |t \#t}}}|.\def\sc|
|00000040| 68 66 61 6c 73 65 7b 5c | 68 62 6f 78 7b 7b 5c 74 |hfalse{\|hbox{{\t|
|00000050| 74 20 5c 23 66 7d 7d 7d | 0a 5c 64 65 66 5c 69 64 |t \#f}}}|.\def\id|
|00000060| 65 23 31 7b 5c 68 62 6f | 78 7b 7b 5c 74 74 20 23 |e#1{\hbo|x{{\tt #|
|00000070| 31 7d 7d 7d 0a 5c 64 65 | 66 5c 63 6f 64 65 23 31 |1}}}.\de|f\code#1|
|00000080| 7b 5c 68 62 6f 78 7b 7b | 5c 74 74 20 23 31 7d 7d |{\hbox{{|\tt #1}}|
|00000090| 7d 0a 0a 0a 5c 6e 65 77 | 63 6f 6d 6d 61 6e 64 7b |}...\new|command{|
|000000a0| 5c 6d 65 74 61 7d 5b 31 | 5d 7b 7b 5c 6e 6f 69 6e |\meta}[1|]{{\noin|
|000000b0| 64 65 6e 74 5c 68 62 6f | 78 7b 5c 72 6d 24 5c 6c |dent\hbo|x{\rm$\l|
|000000c0| 61 6e 67 6c 65 24 23 31 | 24 5c 72 61 6e 67 6c 65 |angle$#1|$\rangle|
|000000d0| 24 7d 7d 7d 0a 5c 6c 65 | 74 5c 68 79 70 65 72 3d |$}}}.\le|t\hyper=|
|000000e0| 5c 6d 65 74 61 0a 5c 6e | 65 77 63 6f 6d 6d 61 6e |\meta.\n|ewcomman|
|000000f0| 64 7b 5c 68 79 70 65 72 | 69 7d 5b 31 5d 7b 5c 68 |d{\hyper|i}[1]{\h|
|00000100| 79 70 65 72 7b 23 31 24 | 5f 31 24 7d 7d 0a 5c 6e |yper{#1$|_1$}}.\n|
|00000110| 65 77 63 6f 6d 6d 61 6e | 64 7b 5c 68 79 70 65 72 |ewcomman|d{\hyper|
|00000120| 69 69 7d 5b 31 5d 7b 5c | 68 79 70 65 72 7b 23 31 |ii}[1]{\|hyper{#1|
|00000130| 24 5f 32 24 7d 7d 0a 5c | 6e 65 77 63 6f 6d 6d 61 |$_2$}}.\|newcomma|
|00000140| 6e 64 7b 5c 68 79 70 65 | 72 6a 7d 5b 31 5d 7b 5c |nd{\hype|rj}[1]{\|
|00000150| 68 79 70 65 72 7b 23 31 | 24 5f 69 24 7d 7d 0a 5c |hyper{#1|$_i$}}.\|
|00000160| 6e 65 77 63 6f 6d 6d 61 | 6e 64 7b 5c 68 79 70 65 |newcomma|nd{\hype|
|00000170| 72 6e 7d 5b 31 5d 7b 5c | 68 79 70 65 72 7b 23 31 |rn}[1]{\|hyper{#1|
|00000180| 24 5f 6e 24 7d 7d 0a 5c | 6e 65 77 63 6f 6d 6d 61 |$_n$}}.\|newcomma|
|00000190| 6e 64 7b 5c 76 61 72 7d | 5b 31 5d 7b 5c 6e 6f 69 |nd{\var}|[1]{\noi|
|000001a0| 6e 64 65 6e 74 5c 68 62 | 6f 78 7b 5c 69 74 7b 7d |ndent\hb|ox{\it{}|
|000001b0| 23 31 5c 2f 7d 7d 20 20 | 25 20 43 61 72 65 66 75 |#1\/}} |% Carefu|
|000001c0| 6c 2c 20 69 73 20 5c 2f | 20 61 6c 77 61 79 73 20 |l, is \/| always |
|000001d0| 74 68 65 20 72 69 67 68 | 74 20 74 68 69 6e 67 3f |the righ|t thing?|
|000001e0| 0a 5c 6e 65 77 63 6f 6d | 6d 61 6e 64 7b 5c 76 61 |.\newcom|mand{\va|
|000001f0| 72 69 7d 5b 31 5d 7b 5c | 76 61 72 7b 23 31 24 5f |ri}[1]{\|var{#1$_|
|00000200| 31 24 7d 7d 0a 5c 6e 65 | 77 63 6f 6d 6d 61 6e 64 |1$}}.\ne|wcommand|
|00000210| 7b 5c 76 61 72 69 69 7d | 5b 31 5d 7b 5c 76 61 72 |{\varii}|[1]{\var|
|00000220| 7b 23 31 24 5f 32 24 7d | 7d 0a 5c 6e 65 77 63 6f |{#1$_2$}|}.\newco|
|00000230| 6d 6d 61 6e 64 7b 5c 76 | 61 72 69 69 69 7d 5b 31 |mmand{\v|ariii}[1|
|00000240| 5d 7b 5c 76 61 72 7b 23 | 31 24 5f 33 24 7d 7d 0a |]{\var{#|1$_3$}}.|
|00000250| 5c 6e 65 77 63 6f 6d 6d | 61 6e 64 7b 5c 76 61 72 |\newcomm|and{\var|
|00000260| 69 76 7d 5b 31 5d 7b 5c | 76 61 72 7b 23 31 24 5f |iv}[1]{\|var{#1$_|
|00000270| 34 24 7d 7d 0a 5c 6e 65 | 77 63 6f 6d 6d 61 6e 64 |4$}}.\ne|wcommand|
|00000280| 7b 5c 76 61 72 6a 7d 5b | 31 5d 7b 5c 76 61 72 7b |{\varj}[|1]{\var{|
|00000290| 23 31 24 5f 6a 24 7d 7d | 0a 5c 6e 65 77 63 6f 6d |#1$_j$}}|.\newcom|
|000002a0| 6d 61 6e 64 7b 5c 76 61 | 72 6e 7d 5b 31 5d 7b 5c |mand{\va|rn}[1]{\|
|000002b0| 76 61 72 7b 23 31 24 5f | 6e 24 7d 7d 0a 0a 0a 5c |var{#1$_|n$}}...\|
|000002c0| 6e 65 77 63 6f 6d 6d 61 | 6e 64 7b 5c 76 72 7d 5b |newcomma|nd{\vr}[|
|000002d0| 31 5d 7b 7b 5c 6e 6f 69 | 6e 64 65 6e 74 5c 68 62 |1]{{\noi|ndent\hb|
|000002e0| 6f 78 7b 24 23 31 24 5c | 2f 7d 7d 7d 20 20 25 20 |ox{$#1$\|/}}} % |
|000002f0| 43 61 72 65 66 75 6c 2c | 20 69 73 20 5c 2f 20 61 |Careful,| is \/ a|
|00000300| 6c 77 61 79 73 20 74 68 | 65 20 72 69 67 68 74 20 |lways th|e right |
|00000310| 74 68 69 6e 67 3f 0a 5c | 6e 65 77 63 6f 6d 6d 61 |thing?.\|newcomma|
|00000320| 6e 64 7b 5c 76 72 69 7d | 5b 31 5d 7b 5c 76 72 7b |nd{\vri}|[1]{\vr{|
|00000330| 23 31 5f 31 7d 7d 0a 5c | 6e 65 77 63 6f 6d 6d 61 |#1_1}}.\|newcomma|
|00000340| 6e 64 7b 5c 76 72 69 69 | 7d 5b 31 5d 7b 5c 76 72 |nd{\vrii|}[1]{\vr|
|00000350| 7b 23 31 5f 32 7d 7d 0a | 5c 6e 65 77 63 6f 6d 6d |{#1_2}}.|\newcomm|
|00000360| 61 6e 64 7b 5c 76 72 69 | 69 69 7d 5b 31 5d 7b 5c |and{\vri|ii}[1]{\|
|00000370| 76 72 7b 23 31 5f 33 7d | 7d 0a 5c 6e 65 77 63 6f |vr{#1_3}|}.\newco|
|00000380| 6d 6d 61 6e 64 7b 5c 76 | 72 69 76 7d 5b 31 5d 7b |mmand{\v|riv}[1]{|
|00000390| 5c 76 72 7b 23 31 5f 34 | 7d 7d 0a 5c 6e 65 77 63 |\vr{#1_4|}}.\newc|
|000003a0| 6f 6d 6d 61 6e 64 7b 5c | 76 72 6a 7d 5b 31 5d 7b |ommand{\|vrj}[1]{|
|000003b0| 5c 76 72 7b 23 31 5f 6a | 7d 7d 0a 5c 6e 65 77 63 |\vr{#1_j|}}.\newc|
|000003c0| 6f 6d 6d 61 6e 64 7b 5c | 76 72 6e 7d 5b 31 5d 7b |ommand{\|vrn}[1]{|
|000003d0| 5c 76 72 7b 23 31 5f 6e | 7d 7d 0a 0a 0a 25 20 5c |\vr{#1_n|}}...% \|
|000003e0| 66 72 6f 62 71 20 77 69 | 6c 6c 20 6d 61 6b 65 20 |frobq wi|ll make |
|000003f0| 71 75 6f 74 65 20 61 6e | 64 20 62 61 63 6b 71 75 |quote an|d backqu|
|00000400| 6f 74 65 20 6c 6f 6f 6b | 20 6e 69 63 65 72 2e 0a |ote look| nicer..|
|00000410| 5c 64 65 66 5c 66 72 6f | 62 71 63 61 74 73 7b 25 |\def\fro|bqcats{%|
|00000420| 5c 63 61 74 63 6f 64 65 | 60 5c 27 3d 31 33 0a 5c |\catcode|`\'=13.\|
|00000430| 63 61 74 63 6f 64 65 60 | 5c 60 3d 31 33 7b 7d 7d |catcode`|\`=13{}}|
|00000440| 0a 7b 5c 66 72 6f 62 71 | 63 61 74 73 0a 5c 67 64 |.{\frobq|cats.\gd|
|00000450| 65 66 5c 66 72 6f 62 71 | 64 65 66 73 7b 25 5c 64 |ef\frobq|defs{%\d|
|00000460| 65 66 27 7b 5c 73 69 6e | 67 6c 65 71 75 6f 74 65 |ef'{\sin|glequote|
|00000470| 7d 0a 5c 64 65 66 60 7b | 5c 62 61 63 6b 71 75 6f |}.\def`{|\backquo|
|00000480| 74 65 7d 7d 7d 0a 5c 64 | 65 66 5c 66 72 6f 62 71 |te}}}.\d|ef\frobq|
|00000490| 7b 5c 66 72 6f 62 71 63 | 61 74 73 5c 66 72 6f 62 |{\frobqc|ats\frob|
|000004a0| 71 64 65 66 73 7d 0a 0a | 0a 25 20 5c 63 66 20 3d |qdefs}..|.% \cf =|
|000004b0| 20 63 6f 64 65 20 66 6f | 6e 74 0a 25 20 55 6e 66 | code fo|nt.% Unf|
|000004c0| 6f 72 74 75 6e 61 74 65 | 6c 79 2c 20 5c 63 66 20 |ortunate|ly, \cf |
|000004d0| 5c 63 66 20 77 6f 6e 27 | 74 20 77 6f 72 6b 20 61 |\cf won'|t work a|
|000004e0| 74 20 61 6c 6c 2c 20 73 | 6f 20 64 6f 6e 27 74 20 |t all, s|o don't |
|000004f0| 65 76 65 6e 20 61 74 74 | 65 6d 70 74 20 74 6f 0a |even att|empt to.|
|00000500| 25 20 6e 65 78 74 20 63 | 6f 6e 73 74 72 75 63 74 |% next c|onstruct|
|00000510| 69 6f 6e 73 20 77 68 69 | 63 68 20 75 73 65 20 74 |ions whi|ch use t|
|00000520| 68 65 6d 2e 2e 2e 0a 5c | 6e 65 77 63 6f 6d 6d 61 |hem....\|newcomma|
|00000530| 6e 64 7b 5c 63 66 7d 7b | 5c 66 72 65 6e 63 68 73 |nd{\cf}{|\frenchs|
|00000540| 70 61 63 69 6e 67 5c 66 | 72 6f 62 71 5c 74 74 7d |pacing\f|robq\tt}|
|00000550| 0a 0a 0a 25 20 53 61 6d | 65 20 61 73 20 5c 6f 62 |...% Sam|e as \ob|
|00000560| 65 79 63 72 2c 20 62 75 | 74 20 64 6f 65 73 6e 27 |eycr, bu|t doesn'|
|00000570| 74 20 64 6f 20 61 20 5c | 40 67 6f 62 62 6c 65 63 |t do a \|@gobblec|
|00000580| 72 2e 0a 7b 5c 63 61 74 | 63 6f 64 65 60 5c 5e 5e |r..{\cat|code`\^^|
|00000590| 4d 3d 31 33 20 5c 67 64 | 65 66 5c 6d 79 6f 62 65 |M=13 \gd|ef\myobe|
|000005a0| 79 63 72 7b 5c 63 61 74 | 63 6f 64 65 60 5c 5e 5e |ycr{\cat|code`\^^|
|000005b0| 4d 3d 31 33 20 5c 64 65 | 66 5e 5e 4d 7b 5c 5c 7d |M=13 \de|f^^M{\\}|
|000005c0| 7d 25 0a 5c 67 64 65 66 | 5c 72 65 73 74 6f 72 65 |}%.\gdef|\restore|
|000005d0| 63 72 7b 5c 63 61 74 63 | 6f 64 65 60 5c 5e 5e 4d |cr{\catc|ode`\^^M|
|000005e0| 3d 35 20 7d 7d 0a 0a 0a | 7b 5c 63 61 74 63 6f 64 |=5 }}...|{\catcod|
|000005f0| 65 60 5c 5e 5e 49 3d 31 | 33 20 5c 67 64 65 66 5c |e`\^^I=1|3 \gdef\|
|00000600| 6f 62 65 79 74 61 62 73 | 7b 5c 63 61 74 63 6f 64 |obeytabs|{\catcod|
|00000610| 65 60 5c 5e 5e 49 3d 31 | 33 20 5c 64 65 66 5e 5e |e`\^^I=1|3 \def^^|
|00000620| 49 7b 5c 68 62 6f 78 7b | 5c 68 73 6b 69 70 20 34 |I{\hbox{|\hskip 4|
|00000630| 65 6d 7d 7d 7d 7d 0a 0a | 0a 7b 5c 6f 62 65 79 73 |em}}}}..|.{\obeys|
|00000640| 70 61 63 65 73 5c 67 64 | 65 66 20 7b 5c 68 62 6f |paces\gd|ef {\hbo|
|00000650| 78 7b 5c 68 73 6b 69 70 | 30 2e 35 65 6d 7d 7d 7d |x{\hskip|0.5em}}}|
|00000660| 0a 0a 0a 5c 67 64 65 66 | 5c 67 6f 62 62 6c 65 63 |...\gdef|\gobblec|
|00000670| 72 7b 5c 40 67 6f 62 62 | 6c 65 63 72 7d 0a 0a 0a |r{\@gobb|lecr}...|
|00000680| 5c 64 65 66 5c 73 65 74 | 75 70 63 6f 64 65 7b 5c |\def\set|upcode{\|
|00000690| 40 6d 61 6b 65 6f 74 68 | 65 72 5c 5e 7d 0a 0a 0a |@makeoth|er\^}...|
|000006a0| 5c 6e 65 77 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 7b |\newenvi|ronment{|
|000006b0| 67 72 61 6d 6d 61 72 7d | 7b 0a 20 20 5c 64 65 66 |grammar}|{. \def|
|000006c0| 5c 3a 7b 5c 67 6f 65 73 | 74 6f 7b 7d 7d 0a 20 20 |\:{\goes|to{}}. |
|000006d0| 5c 64 65 66 5c 7c 7b 24 | 5c 76 65 72 74 24 7d 0a |\def\|{$|\vert$}.|
|000006e0| 20 20 5c 63 66 20 5c 6d | 79 6f 62 65 79 63 72 0a | \cf \m|yobeycr.|
|000006f0| 20 20 5c 62 65 67 69 6e | 7b 74 61 62 62 69 6e 67 | \begin|{tabbing|
|00000700| 7d 0a 20 20 20 20 25 5c | 71 71 75 61 64 5c 71 75 |}. %\|qquad\qu|
|00000710| 61 64 20 5c 3d 20 0a 20 | 20 20 20 5c 71 71 75 61 |ad \= . | \qqua|
|00000720| 64 20 5c 3d 20 24 5c 76 | 65 72 74 24 20 5c 3d 20 |d \= $\v|ert$ \= |
|00000730| 5c 6b 69 6c 6c 0a 20 20 | 7d 7b 5c 75 6e 73 6b 69 |\kill. |}{\unski|
|00000740| 70 5c 65 6e 64 7b 74 61 | 62 62 69 6e 67 7d 7d 0a |p\end{ta|bbing}}.|
|00000750| 0a 0a 25 20 43 6f 6d 6d | 61 6e 64 73 20 66 6f 72 |..% Comm|ands for|
|00000760| 20 67 72 61 6d 6d 61 72 | 73 0a 5c 6e 65 77 63 6f | grammar|s.\newco|
|00000770| 6d 6d 61 6e 64 7b 5c 61 | 72 62 6e 6f 7d 5b 31 5d |mmand{\a|rbno}[1]|
|00000780| 7b 23 31 5c 68 62 6f 78 | 7b 5c 72 6d 2a 7d 7d 20 |{#1\hbox|{\rm*}} |
|00000790| 20 0a 5c 6e 65 77 63 6f | 6d 6d 61 6e 64 7b 5c 61 | .\newco|mmand{\a|
|000007a0| 74 6c 65 61 73 74 6f 6e | 65 7d 5b 31 5d 7b 23 31 |tleaston|e}[1]{#1|
|000007b0| 5c 68 62 6f 78 7b 24 5e | 2b 24 7d 7d 0a 0a 0a 5c |\hbox{$^|+$}}...\|
|000007c0| 6e 65 77 63 6f 6d 6d 61 | 6e 64 7b 5c 67 6f 65 73 |newcomma|nd{\goes|
|000007d0| 74 6f 7d 7b 24 5c 6c 6f | 6e 67 72 69 67 68 74 61 |to}{$\lo|ngrighta|
|000007e0| 72 72 6f 77 24 7d 0a 0a | 0a 25 20 49 20 63 6f 75 |rrow$}..|.% I cou|
|000007f0| 6c 64 6e 27 74 20 67 65 | 74 20 74 68 65 20 72 65 |ldn't ge|t the re|
|00000800| 66 65 72 65 6e 63 65 73 | 20 74 6f 20 77 6f 72 6b |ferences| to work|
|00000810| 2e 0a 0a 0a 5c 64 65 66 | 5c 72 72 72 73 7b 31 7d |....\def|\rrrs{1}|
|00000820| 0a 5c 64 65 66 5c 6d 61 | 63 72 6f 73 74 68 61 74 |.\def\ma|crosthat|
|00000830| 77 6f 72 6b 7b 32 7d 0a | 5c 64 65 66 5c 49 45 45 |work{2}.|\def\IEE|
|00000840| 45 53 63 68 65 6d 65 7b | 33 7d 0a 5c 64 65 66 5c |EScheme{|3}.\def\|
|00000850| 6b 6f 68 6c 62 65 63 6b | 65 72 7b 34 7d 0a 5c 64 |kohlbeck|er{4}.\d|
|00000860| 65 66 5c 43 4c 74 4c 32 | 7b 35 7d 0a 0a 0a 0a 0a |ef\CLtL2|{5}.....|
|00000870| 0a 0a 5c 62 65 67 69 6e | 7b 64 6f 63 75 6d 65 6e |..\begin|{documen|
|00000880| 74 7d 0a 0a 0a 5c 63 65 | 6e 74 65 72 6c 69 6e 65 |t}...\ce|nterline|
|00000890| 7b 7b 5c 4c 61 72 67 65 | 20 4d 61 63 72 6f 73 20 |{{\Large| Macros |
|000008a0| 69 6e 20 53 63 68 65 6d | 65 7d 7d 0a 0a 0a 5c 76 |in Schem|e}}...\v|
|000008b0| 73 6b 69 70 20 31 38 70 | 74 0a 0a 0a 5c 63 65 6e |skip 18p|t...\cen|
|000008c0| 74 65 72 6c 69 6e 65 7b | 57 69 6c 6c 69 61 6d 20 |terline{|William |
|000008d0| 43 6c 69 6e 67 65 72 7d | 0a 0a 0a 5c 76 73 6b 69 |Clinger}|...\vski|
|000008e0| 70 20 33 36 70 74 0a 0a | 0a 41 6c 74 68 6f 75 67 |p 36pt..|.Althoug|
|000008f0| 68 20 6d 61 63 72 6f 73 | 20 61 72 65 20 65 76 65 |h macros| are eve|
|00000900| 6e 20 6f 6c 64 65 72 20 | 74 68 61 6e 20 4c 69 73 |n older |than Lis|
|00000910| 70 2c 20 53 63 68 65 6d | 65 20 68 61 73 20 6a 75 |p, Schem|e has ju|
|00000920| 73 74 20 62 65 63 6f 6d | 65 0a 74 68 65 20 66 69 |st becom|e.the fi|
|00000930| 72 73 74 20 62 6c 6f 63 | 6b 2d 73 74 72 75 63 74 |rst bloc|k-struct|
|00000940| 75 72 65 64 20 70 72 6f | 67 72 61 6d 6d 69 6e 67 |ured pro|gramming|
|00000950| 20 6c 61 6e 67 75 61 67 | 65 20 74 6f 0a 73 75 70 | languag|e to.sup|
|00000960| 70 6f 72 74 20 61 20 72 | 65 6c 69 61 62 6c 65 20 |port a r|eliable |
|00000970| 6d 61 63 72 6f 20 73 79 | 73 74 65 6d 2e 0a 54 68 |macro sy|stem..Th|
|00000980| 69 73 20 6d 61 63 72 6f | 20 73 79 73 74 65 6d 20 |is macro| system |
|00000990| 69 73 20 64 65 73 63 72 | 69 62 65 64 20 69 6e 20 |is descr|ibed in |
|000009a0| 74 68 65 20 61 70 70 65 | 6e 64 69 78 20 74 6f 20 |the appe|ndix to |
|000009b0| 74 68 65 0a 7b 5c 65 6d | 20 52 65 76 69 73 65 64 |the.{\em| Revised|
|000009c0| 24 5e 34 24 20 52 65 70 | 6f 72 74 20 6f 6e 20 74 |$^4$ Rep|ort on t|
|000009d0| 68 65 20 41 6c 67 6f 72 | 69 74 68 6d 69 63 20 4c |he Algor|ithmic L|
|000009e0| 61 6e 67 75 61 67 65 20 | 53 63 68 65 6d 65 7d 0a |anguage |Scheme}.|
|000009f0| 5b 5c 72 72 72 73 5d 2e | 0a 54 68 69 73 20 74 65 |[\rrrs].|.This te|
|00000a00| 63 68 6e 69 63 61 6c 20 | 72 65 70 6f 72 74 20 63 |chnical |report c|
|00000a10| 6f 6e 74 61 69 6e 73 20 | 74 68 72 65 65 20 6d 6f |ontains |three mo|
|00000a20| 72 65 20 61 72 74 69 63 | 6c 65 73 20 6f 6e 20 74 |re artic|les on t|
|00000a30| 68 65 20 73 75 62 6a 65 | 63 74 20 6f 66 0a 6d 61 |he subje|ct of.ma|
|00000a40| 63 72 6f 73 20 69 6e 20 | 53 63 68 65 6d 65 2c 20 |cros in |Scheme, |
|00000a50| 63 6f 75 6e 74 69 6e 67 | 20 74 68 65 20 61 72 74 |counting| the art|
|00000a60| 69 63 6c 65 20 79 6f 75 | 20 61 72 65 20 72 65 61 |icle you| are rea|
|00000a70| 64 69 6e 67 2e 0a 49 20 | 77 72 6f 74 65 20 74 68 |ding..I |wrote th|
|00000a80| 69 73 20 61 73 20 61 6e | 20 69 6e 74 72 6f 64 75 |is as an| introdu|
|00000a90| 63 74 69 6f 6e 20 74 6f | 20 74 68 65 20 6f 74 68 |ction to| the oth|
|00000aa0| 65 72 20 74 77 6f 20 61 | 72 74 69 63 6c 65 73 2c |er two a|rticles,|
|00000ab0| 0a 62 65 63 61 75 73 65 | 20 69 74 20 69 73 20 76 |.because| it is v|
|00000ac0| 65 72 79 20 68 61 72 64 | 20 74 6f 20 75 6e 64 65 |ery hard| to unde|
|00000ad0| 72 73 74 61 6e 64 20 74 | 68 65 69 72 20 70 75 72 |rstand t|heir pur|
|00000ae0| 70 6f 73 65 20 77 69 74 | 68 6f 75 74 20 73 6f 6d |pose wit|hout som|
|00000af0| 65 0a 66 75 72 74 68 65 | 72 20 62 61 63 6b 67 72 |e.furthe|r backgr|
|00000b00| 6f 75 6e 64 20 6f 6e 20 | 6d 61 63 72 6f 73 20 69 |ound on |macros i|
|00000b10| 6e 20 53 63 68 65 6d 65 | 2e 0a 0a 0a 4d 61 63 72 |n Scheme|....Macr|
|00000b20| 6f 73 20 61 72 65 20 68 | 61 72 64 6c 79 20 6e 65 |os are h|ardly ne|
|00000b30| 77 20 69 6e 20 74 68 65 | 20 4c 69 73 70 20 77 6f |w in the| Lisp wo|
|00000b40| 72 6c 64 2c 20 73 6f 20 | 49 20 63 61 6e 20 65 78 |rld, so |I can ex|
|00000b50| 70 6c 61 69 6e 20 77 68 | 61 74 0a 69 73 20 6e 65 |plain wh|at.is ne|
|00000b60| 77 20 61 62 6f 75 74 20 | 74 68 65 20 53 63 68 65 |w about |the Sche|
|00000b70| 6d 65 20 6d 61 63 72 6f | 20 73 79 73 74 65 6d 20 |me macro| system |
|00000b80| 62 79 20 63 6f 6d 70 61 | 72 69 6e 67 20 69 74 20 |by compa|ring it |
|00000b90| 74 6f 20 43 6f 6d 6d 6f | 6e 0a 4c 69 73 70 27 73 |to Commo|n.Lisp's|
|00000ba0| 20 5b 5c 43 4c 74 4c 32 | 5d 2e 20 20 43 6f 6e 73 | [\CLtL2|]. Cons|
|00000bb0| 69 64 65 72 20 61 20 73 | 69 6d 70 6c 65 20 5c 63 |ider a s|imple \c|
|00000bc0| 6f 64 65 7b 70 75 73 68 | 7d 20 6d 61 63 72 6f 20 |ode{push|} macro |
|00000bd0| 74 68 61 74 20 69 73 20 | 6c 69 6b 65 20 74 68 65 |that is |like the|
|00000be0| 0a 5c 63 6f 64 65 7b 70 | 75 73 68 7d 20 6d 61 63 |.\code{p|ush} mac|
|00000bf0| 72 6f 20 69 6e 20 43 6f | 6d 6d 6f 6e 20 4c 69 73 |ro in Co|mmon Lis|
|00000c00| 70 20 65 78 63 65 70 74 | 20 74 68 61 74 20 74 68 |p except| that th|
|00000c10| 65 0a 7b 5c 69 74 20 70 | 6c 61 63 65 7d 20 62 65 |e.{\it p|lace} be|
|00000c20| 69 6e 67 20 70 75 73 68 | 65 64 20 69 73 20 72 65 |ing push|ed is re|
|00000c30| 71 75 69 72 65 64 20 74 | 6f 20 62 65 20 61 20 76 |quired t|o be a v|
|00000c40| 61 72 69 61 62 6c 65 2e | 0a 49 6e 20 53 63 68 65 |ariable.|.In Sche|
|00000c50| 6d 65 20 77 65 20 63 61 | 6e 20 77 72 69 74 65 20 |me we ca|n write |
|00000c60| 74 68 69 73 20 6d 61 63 | 72 6f 20 61 73 0a 5c 62 |this mac|ro as.\b|
|00000c70| 65 67 69 6e 7b 76 65 72 | 62 61 74 69 6d 7d 0a 20 |egin{ver|batim}. |
|00000c80| 20 20 20 28 64 65 66 69 | 6e 65 2d 73 79 6e 74 61 | (defi|ne-synta|
|00000c90| 78 20 70 75 73 68 0a 20 | 20 20 20 20 20 28 73 79 |x push. | (sy|
|00000ca0| 6e 74 61 78 2d 72 75 6c | 65 73 20 28 29 0a 20 20 |ntax-rul|es (). |
|00000cb0| 20 20 20 20 20 20 20 28 | 28 70 75 73 68 20 69 74 | (|(push it|
|00000cc0| 65 6d 20 70 6c 61 63 65 | 29 0a 20 20 20 20 20 20 |em place|). |
|00000cd0| 20 20 20 20 28 73 65 74 | 21 20 70 6c 61 63 65 20 | (set|! place |
|00000ce0| 28 63 6f 6e 73 20 69 74 | 65 6d 20 70 6c 61 63 65 |(cons it|em place|
|00000cf0| 29 29 29 29 29 0a 5c 65 | 6e 64 7b 76 65 72 62 61 |))))).\e|nd{verba|
|00000d00| 74 69 6d 7d 0a 5c 6e 6f | 69 6e 64 65 6e 74 0a 61 |tim}.\no|indent.a|
|00000d10| 6e 64 20 77 65 20 63 61 | 6e 20 75 73 65 20 5c 63 |nd we ca|n use \c|
|00000d20| 6f 64 65 7b 70 75 73 68 | 7d 20 69 6e 20 61 6e 20 |ode{push|} in an |
|00000d30| 65 78 70 72 65 73 73 69 | 6f 6e 20 73 75 63 68 20 |expressi|on such |
|00000d40| 61 73 0a 5c 62 65 67 69 | 6e 7b 76 65 72 62 61 74 |as.\begi|n{verbat|
|00000d50| 69 6d 7d 0a 20 20 20 20 | 28 6c 65 74 2a 20 28 28 |im}. |(let* ((|
|00000d60| 63 6f 6e 73 20 28 6c 61 | 6d 62 64 61 20 28 6e 61 |cons (la|mbda (na|
|00000d70| 6d 65 29 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |me). | |
|00000d80| 20 20 20 20 20 20 20 28 | 63 61 73 65 20 6e 61 6d | (|case nam|
|00000d90| 65 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e. | |
|00000da0| 20 20 20 20 20 20 20 28 | 28 70 68 69 6c 29 20 20 | (|(phil) |
|00000db0| 27 28 22 74 68 72 65 65 | 2d 63 61 72 64 20 6d 6f |'("three|-card mo|
|00000dc0| 6e 74 65 22 29 29 0a 20 | 20 20 20 20 20 20 20 20 |nte")). | |
|00000dd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 28 28 64 69 | | ((di|
|00000de0| 63 6b 29 20 20 27 28 22 | 73 65 63 72 65 74 20 70 |ck) '("|secret p|
|00000df0| 6c 61 6e 20 74 6f 20 65 | 6e 64 20 74 68 65 20 77 |lan to e|nd the w|
|00000e00| 61 72 22 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ar". | |
|00000e10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e20| 20 20 20 20 22 61 67 6e | 65 77 22 0a 20 20 20 20 | "agn|ew". |
|00000e30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 22 6e 6f 74 | | "not|
|00000e50| 20 61 20 63 72 6f 6f 6b | 22 29 29 0a 20 20 20 20 | a crook|")). |
|00000e60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e70| 20 28 28 6a 69 6d 6d 79 | 29 20 27 28 22 77 68 79 | ((jimmy|) '("why|
|00000e80| 20 6e 6f 74 20 74 68 65 | 20 62 65 73 74 22 29 29 | not the| best"))|
|00000e90| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00000ea0| 20 20 20 20 20 20 28 28 | 72 6f 6e 29 20 20 20 27 | ((|ron) '|
|00000eb0| 28 22 61 62 6f 6c 69 73 | 68 20 74 68 65 20 64 72 |("abolis|h the dr|
|00000ec0| 61 66 74 22 0a 20 20 20 | 20 20 20 20 20 20 20 20 |aft". | |
|00000ed0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ee0| 20 20 20 20 20 22 62 61 | 6c 61 6e 63 65 20 74 68 | "ba|lance th|
|00000ef0| 65 20 62 75 64 67 65 74 | 22 29 29 0a 20 20 20 20 |e budget|")). |
|00000f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f10| 20 28 65 6c 73 65 20 20 | 20 20 27 28 29 29 29 29 | (else | '())))|
|00000f20| 29 0a 20 20 20 20 20 20 | 20 20 20 20 20 28 73 63 |). | (sc|
|00000f30| 61 6d 73 20 28 63 6f 6e | 73 20 27 70 68 69 6c 29 |ams (con|s 'phil)|
|00000f40| 29 29 0a 20 20 20 20 20 | 20 28 70 75 73 68 20 28 |)). | (push (|
|00000f50| 63 61 72 20 28 63 6f 6e | 73 20 27 6a 69 6d 6d 79 |car (con|s 'jimmy|
|00000f60| 29 29 20 73 63 61 6d 73 | 29 0a 20 20 20 20 20 20 |)) scams|). |
|00000f70| 28 70 75 73 68 20 28 63 | 61 64 72 20 28 63 6f 6e |(push (c|adr (con|
|00000f80| 73 20 27 72 6f 6e 29 29 | 20 73 63 61 6d 73 29 0a |s 'ron))| scams).|
|00000f90| 20 20 20 20 20 20 73 63 | 61 6d 73 29 0a 5c 65 6e | sc|ams).\en|
|00000fa0| 64 7b 76 65 72 62 61 74 | 69 6d 7d 0a 5c 6e 6f 69 |d{verbat|im}.\noi|
|00000fb0| 6e 64 65 6e 74 0a 54 68 | 69 73 20 65 78 70 72 65 |ndent.Th|is expre|
|00000fc0| 73 73 69 6f 6e 20 77 69 | 6c 6c 20 65 76 61 6c 75 |ssion wi|ll evalu|
|00000fd0| 61 74 65 20 74 6f 0a 5c | 62 65 67 69 6e 7b 76 65 |ate to.\|begin{ve|
|00000fe0| 72 62 61 74 69 6d 7d 0a | 20 20 20 20 28 22 62 61 |rbatim}.| ("ba|
|00000ff0| 6c 61 6e 63 65 20 74 68 | 65 20 62 75 64 67 65 74 |lance th|e budget|
|00001000| 22 20 22 77 68 79 20 6e | 6f 74 20 74 68 65 20 62 |" "why n|ot the b|
|00001010| 65 73 74 22 20 22 74 68 | 72 65 65 2d 63 61 72 64 |est" "th|ree-card|
|00001020| 20 6d 6f 6e 74 65 22 29 | 0a 5c 65 6e 64 7b 76 65 | monte")|.\end{ve|
|00001030| 72 62 61 74 69 6d 7d 0a | 54 68 61 74 2c 20 61 74 |rbatim}.|That, at|
|00001040| 20 6c 65 61 73 74 2c 20 | 69 73 20 77 68 61 74 20 | least, |is what |
|00001050| 74 68 69 73 20 65 78 70 | 72 65 73 73 69 6f 6e 20 |this exp|ression |
|00001060| 77 69 6c 6c 20 65 76 61 | 6c 75 61 74 65 20 74 6f |will eva|luate to|
|00001070| 20 69 6e 20 53 63 68 65 | 6d 65 2e 0a 0a 0a 57 65 | in Sche|me....We|
|00001080| 27 72 65 20 6e 6f 74 20 | 73 75 70 70 6f 73 65 64 |'re not |supposed|
|00001090| 20 74 6f 20 77 72 69 74 | 65 20 65 78 70 72 65 73 | to writ|e expres|
|000010a0| 73 69 6f 6e 73 20 6c 69 | 6b 65 20 74 68 69 73 20 |sions li|ke this |
|000010b0| 69 6e 20 43 6f 6d 6d 6f | 6e 20 4c 69 73 70 2c 0a |in Commo|n Lisp,.|
|000010c0| 61 63 63 6f 72 64 69 6e | 67 20 74 6f 20 5c 63 6f |accordin|g to \co|
|000010d0| 64 65 7b 4c 49 53 50 2d | 53 59 4d 42 4f 4c 2d 52 |de{LISP-|SYMBOL-R|
|000010e0| 45 44 45 46 49 4e 49 54 | 49 4f 4e 3a 4d 41 52 38 |EDEFINIT|ION:MAR8|
|000010f0| 39 2d 58 33 4a 31 33 7d | 2e 0a 28 54 68 65 20 60 |9-X3J13}|..(The `|
|00001100| 60 63 6f 6e 73 65 71 75 | 65 6e 63 65 73 20 61 72 |`consequ|ences ar|
|00001110| 65 20 75 6e 64 65 66 69 | 6e 65 64 27 27 29 2e 0a |e undefi|ned'')..|
|00001120| 4f 6e 65 20 72 65 61 73 | 6f 6e 20 66 6f 72 20 74 |One reas|on for t|
|00001130| 68 69 73 20 64 65 63 69 | 73 69 6f 6e 20 62 79 20 |his deci|sion by |
|00001140| 58 33 4a 31 33 20 69 73 | 20 74 68 61 74 20 74 68 |X3J13 is| that th|
|00001150| 65 20 43 6f 6d 6d 6f 6e | 20 4c 69 73 70 20 6d 61 |e Common| Lisp ma|
|00001160| 63 72 6f 0a 73 79 73 74 | 65 6d 20 69 73 20 75 6e |cro.syst|em is un|
|00001170| 72 65 6c 69 61 62 6c 65 | 2c 20 73 6f 20 61 20 6c |reliable|, so a l|
|00001180| 65 78 69 63 61 6c 20 62 | 69 6e 64 69 6e 67 20 6f |exical b|inding o|
|00001190| 66 20 5c 63 6f 64 65 7b | 63 6f 6e 73 7d 20 61 73 |f \code{|cons} as|
|000011a0| 20 69 6e 0a 74 68 65 20 | 61 62 6f 76 65 20 65 78 | in.the |above ex|
|000011b0| 61 6d 70 6c 65 20 63 61 | 6e 20 62 72 65 61 6b 20 |ample ca|n break |
|000011c0| 6d 61 63 72 6f 73 20 73 | 75 63 68 20 61 73 20 5c |macros s|uch as \|
|000011d0| 63 6f 64 65 7b 70 75 73 | 68 7d 2e 0a 54 68 65 20 |code{pus|h}..The |
|000011e0| 64 65 63 69 73 69 6f 6e | 20 62 79 20 58 33 4a 31 |decision| by X3J1|
|000011f0| 33 20 64 6f 65 73 6e 27 | 74 20 72 65 61 6c 6c 79 |3 doesn'|t really|
|00001200| 20 73 6f 6c 76 65 20 74 | 68 65 20 70 72 6f 62 6c | solve t|he probl|
|00001210| 65 6d 2c 20 62 65 63 61 | 75 73 65 20 69 74 0a 64 |em, beca|use it.d|
|00001220| 6f 65 73 6e 27 74 20 61 | 64 64 72 65 73 73 20 6d |oesn't a|ddress m|
|00001230| 61 63 72 6f 73 20 74 68 | 61 74 20 72 65 66 65 72 |acros th|at refer|
|00001240| 20 74 6f 20 67 6c 6f 62 | 61 6c 20 66 75 6e 63 74 | to glob|al funct|
|00001250| 69 6f 6e 73 20 77 72 69 | 74 74 65 6e 20 62 79 0a |ions wri|tten by.|
|00001260| 74 68 65 20 75 73 65 72 | 20 6f 66 20 61 20 43 6f |the user| of a Co|
|00001270| 6d 6d 6f 6e 20 4c 69 73 | 70 20 73 79 73 74 65 6d |mmon Lis|p system|
|00001280| 2c 20 62 75 74 20 69 74 | 20 64 6f 65 73 20 6d 61 |, but it| does ma|
|00001290| 6b 65 20 43 6f 6d 6d 6f | 6e 20 4c 69 73 70 0a 73 |ke Commo|n Lisp.s|
|000012a0| 69 67 6e 69 66 69 63 61 | 6e 74 6c 79 20 6c 65 73 |ignifica|ntly les|
|000012b0| 73 20 75 6e 72 65 6c 69 | 61 62 6c 65 20 69 6e 20 |s unreli|able in |
|000012c0| 70 72 61 63 74 69 63 65 | 2e 0a 0a 0a 52 65 63 6f |practice|....Reco|
|000012d0| 67 6e 69 7a 69 6e 67 20 | 74 68 61 74 20 5c 63 6f |gnizing |that \co|
|000012e0| 64 65 7b 4c 49 53 50 2d | 53 59 4d 42 4f 4c 2d 52 |de{LISP-|SYMBOL-R|
|000012f0| 45 44 45 46 49 4e 49 54 | 49 4f 4e 3a 4d 41 52 38 |EDEFINIT|ION:MAR8|
|00001300| 39 2d 58 33 4a 31 33 7d | 0a 64 6f 65 73 6e 27 74 |9-X3J13}|.doesn't|
|00001310| 20 63 6f 6d 70 6c 65 74 | 65 6c 79 20 73 6f 6c 76 | complet|ely solv|
|00001320| 65 20 74 68 65 20 70 72 | 6f 62 6c 65 6d 2c 20 6c |e the pr|oblem, l|
|00001330| 65 74 27 73 20 70 75 73 | 68 20 66 6f 72 77 61 72 |et's pus|h forwar|
|00001340| 64 20 77 69 74 68 0a 6f | 75 72 20 65 78 61 6d 70 |d with.o|ur examp|
|00001350| 6c 65 20 61 73 20 74 68 | 6f 75 67 68 20 58 33 4a |le as th|ough X3J|
|00001360| 31 33 20 64 69 64 6e 27 | 74 20 65 78 69 73 74 2e |13 didn'|t exist.|
|00001370| 20 20 28 4f 74 68 65 72 | 77 69 73 65 20 49 20 77 | (Other|wise I w|
|00001380| 6f 75 6c 64 0a 68 61 76 | 65 20 74 6f 20 63 6f 6e |ould.hav|e to con|
|00001390| 73 74 72 75 63 74 20 61 | 20 64 69 66 66 65 72 65 |struct a| differe|
|000013a0| 6e 74 20 65 78 61 6d 70 | 6c 65 21 29 0a 0a 0a 49 |nt examp|le!)...I|
|000013b0| 66 20 77 65 20 74 72 61 | 6e 73 6c 61 74 65 20 65 |f we tra|nslate e|
|000013c0| 76 65 72 79 74 68 69 6e | 67 20 74 6f 20 70 72 65 |verythin|g to pre|
|000013d0| 2d 58 33 4a 31 33 20 43 | 6f 6d 6d 6f 6e 20 4c 69 |-X3J13 C|ommon Li|
|000013e0| 73 70 20 77 65 20 77 69 | 6c 6c 20 67 65 74 20 61 |sp we wi|ll get a|
|000013f0| 6e 0a 65 72 72 6f 72 2c | 20 62 65 63 61 75 73 65 |n.error,| because|
|00001400| 20 69 6e 20 43 6f 6d 6d | 6f 6e 20 4c 69 73 70 20 | in Comm|on Lisp |
|00001410| 74 68 65 20 66 69 72 73 | 74 20 75 73 65 20 6f 66 |the firs|t use of|
|00001420| 20 5c 63 6f 64 65 7b 70 | 75 73 68 7d 20 77 6f 75 | \code{p|ush} wou|
|00001430| 6c 64 0a 65 78 70 61 6e | 64 20 69 6e 74 6f 0a 5c |ld.expan|d into.\|
|00001440| 62 65 67 69 6e 7b 76 65 | 72 62 61 74 69 6d 7d 0a |begin{ve|rbatim}.|
|00001450| 20 20 20 20 28 73 65 74 | 71 20 73 63 61 6d 73 20 | (set|q scams |
|00001460| 28 63 6f 6e 73 20 28 63 | 6f 6e 73 20 27 6a 69 6d |(cons (c|ons 'jim|
|00001470| 6d 79 29 20 73 63 61 6d | 73 29 29 0a 5c 65 6e 64 |my) scam|s)).\end|
|00001480| 7b 76 65 72 62 61 74 69 | 6d 7d 0a 5c 6e 6f 69 6e |{verbati|m}.\noin|
|00001490| 64 65 6e 74 0a 77 69 74 | 68 69 6e 20 61 20 63 6f |dent.wit|hin a co|
|000014a0| 6e 74 65 78 74 20 77 68 | 65 72 65 20 5c 63 6f 64 |ntext wh|ere \cod|
|000014b0| 65 7b 63 6f 6e 73 7d 20 | 69 73 20 62 6f 75 6e 64 |e{cons} |is bound|
|000014c0| 20 74 6f 20 61 20 6f 6e | 65 2d 61 72 67 75 6d 65 | to a on|e-argume|
|000014d0| 6e 74 20 70 72 6f 63 65 | 64 75 72 65 2e 0a 54 68 |nt proce|dure..Th|
|000014e0| 65 72 65 20 61 72 65 20 | 76 61 72 69 6f 75 73 20 |ere are |various |
|000014f0| 77 61 79 73 20 6f 6e 65 | 20 6d 69 67 68 74 20 74 |ways one| might t|
|00001500| 72 79 20 74 6f 20 77 6f | 72 6b 20 61 72 6f 75 6e |ry to wo|rk aroun|
|00001510| 64 20 74 68 69 73 20 70 | 72 6f 62 6c 65 6d 20 69 |d this p|roblem i|
|00001520| 6e 0a 43 6f 6d 6d 6f 6e | 20 4c 69 73 70 2c 20 62 |n.Common| Lisp, b|
|00001530| 75 74 20 6e 6f 6e 65 20 | 61 72 65 20 66 75 6c 6c |ut none |are full|
|00001540| 79 20 67 65 6e 65 72 61 | 6c 2e 20 20 49 66 20 61 |y genera|l. If a|
|00001550| 20 6d 61 63 72 6f 20 6e | 65 65 64 73 20 74 6f 20 | macro n|eeds to |
|00001560| 72 65 66 65 72 20 74 6f | 0a 61 20 67 6c 6f 62 61 |refer to|.a globa|
|00001570| 6c 20 76 61 72 69 61 62 | 6c 65 20 6f 72 20 66 75 |l variab|le or fu|
|00001580| 6e 63 74 69 6f 6e 20 28 | 6f 74 68 65 72 20 74 68 |nction (|other th|
|00001590| 61 6e 20 74 68 6f 73 65 | 20 70 72 65 64 65 66 69 |an those| predefi|
|000015a0| 6e 65 64 20 69 6e 20 74 | 68 65 0a 5c 63 6f 64 65 |ned in t|he.\code|
|000015b0| 7b 63 6f 6d 6d 6f 6e 2d | 6c 69 73 70 7d 20 70 61 |{common-|lisp} pa|
|000015c0| 63 6b 61 67 65 2c 20 77 | 68 69 63 68 20 58 33 4a |ckage, w|hich X3J|
|000015d0| 31 33 20 68 61 73 20 65 | 66 66 65 63 74 69 76 65 |13 has e|ffective|
|000015e0| 6c 79 20 6d 61 64 65 20 | 69 6e 74 6f 0a 72 65 73 |ly made |into.res|
|000015f0| 65 72 76 65 64 20 77 6f | 72 64 73 29 2c 20 74 68 |erved wo|rds), th|
|00001600| 65 6e 20 69 74 20 69 73 | 20 71 75 69 74 65 20 69 |en it is| quite i|
|00001610| 6d 70 6f 73 73 69 62 6c | 65 20 74 6f 20 77 72 69 |mpossibl|e to wri|
|00001620| 74 65 20 74 68 61 74 20 | 6d 61 63 72 6f 0a 72 65 |te that |macro.re|
|00001630| 6c 69 61 62 6c 79 20 75 | 73 69 6e 67 20 74 68 65 |liably u|sing the|
|00001640| 20 43 6f 6d 6d 6f 6e 20 | 4c 69 73 70 20 6d 61 63 | Common |Lisp mac|
|00001650| 72 6f 20 73 79 73 74 65 | 6d 2e 0a 0a 0a 49 27 6d |ro syste|m....I'm|
|00001660| 20 61 73 20 77 69 6c 6c | 69 6e 67 20 61 73 20 61 | as will|ing as a|
|00001670| 6e 79 6f 6e 65 20 74 6f | 20 70 69 63 6b 20 6f 6e |nyone to| pick on|
|00001680| 20 43 6f 6d 6d 6f 6e 20 | 4c 69 73 70 2c 20 62 75 | Common |Lisp, bu|
|00001690| 74 20 74 68 61 74 27 73 | 20 6e 6f 74 20 77 68 61 |t that's| not wha|
|000016a0| 74 0a 49 27 6d 20 64 6f | 69 6e 67 20 68 65 72 65 |t.I'm do|ing here|
|000016b0| 2e 20 20 57 68 65 6e 20 | 43 6f 6d 6d 6f 6e 20 4c |. When |Common L|
|000016c0| 69 73 70 20 77 61 73 20 | 62 65 69 6e 67 20 64 65 |isp was |being de|
|000016d0| 73 69 67 6e 65 64 20 53 | 63 68 65 6d 65 20 68 61 |signed S|cheme ha|
|000016e0| 64 20 6e 6f 0a 6d 61 63 | 72 6f 20 73 79 73 74 65 |d no.mac|ro syste|
|000016f0| 6d 20 61 74 20 61 6c 6c | 2c 20 66 6f 72 20 74 68 |m at all|, for th|
|00001700| 69 73 20 76 65 72 79 20 | 72 65 61 73 6f 6e 3a 20 |is very |reason: |
|00001710| 20 4d 61 63 72 6f 73 20 | 77 65 72 65 20 69 6e 68 | Macros |were inh|
|00001720| 65 72 65 6e 74 6c 79 0a | 75 6e 72 65 6c 69 61 62 |erently.|unreliab|
|00001730| 6c 65 2c 20 6f 72 20 73 | 6f 20 77 65 20 74 68 6f |le, or s|o we tho|
|00001740| 75 67 68 74 20 74 68 65 | 6e 2e 0a 45 76 65 6e 20 |ught the|n..Even |
|00001750| 74 6f 64 61 79 2c 20 65 | 78 63 65 70 74 20 66 6f |today, e|xcept fo|
|00001760| 72 20 53 63 68 65 6d 65 | 20 61 6e 64 20 61 20 63 |r Scheme| and a c|
|00001770| 6f 75 70 6c 65 20 6f 66 | 20 72 65 73 65 61 72 63 |ouple of| researc|
|00001780| 68 0a 6c 61 6e 67 75 61 | 67 65 73 20 74 68 61 74 |h.langua|ges that|
|00001790| 20 65 6d 70 6c 6f 79 20 | 61 20 53 63 68 65 6d 65 | employ |a Scheme|
|000017a0| 2d 73 74 79 6c 65 20 6d | 61 63 72 6f 20 73 79 73 |-style m|acro sys|
|000017b0| 74 65 6d 2c 20 43 6f 6d | 6d 6f 6e 20 4c 69 73 70 |tem, Com|mon Lisp|
|000017c0| 0a 70 72 6f 62 61 62 6c | 79 20 68 61 73 20 74 68 |.probabl|y has th|
|000017d0| 65 20 6d 6f 73 74 20 73 | 6f 70 68 69 73 74 69 63 |e most s|ophistic|
|000017e0| 61 74 65 64 20 6d 61 63 | 72 6f 73 20 6f 66 20 61 |ated mac|ros of a|
|000017f0| 6e 79 20 70 72 6f 67 72 | 61 6d 6d 69 6e 67 20 6c |ny progr|amming l|
|00001800| 61 6e 67 75 61 67 65 2e | 0a 54 68 65 20 66 61 63 |anguage.|.The fac|
|00001810| 74 20 69 73 20 74 68 61 | 74 20 6d 61 63 72 6f 73 |t is tha|t macros|
|00001820| 20 68 61 76 65 20 62 65 | 65 6e 20 75 6e 72 65 6c | have be|en unrel|
|00001830| 69 61 62 6c 65 20 69 6e | 20 62 6c 6f 63 6b 2d 73 |iable in| block-s|
|00001840| 74 72 75 63 74 75 72 65 | 64 0a 70 72 6f 67 72 61 |tructure|d.progra|
|00001850| 6d 6d 69 6e 67 20 6c 61 | 6e 67 75 61 67 65 73 20 |mming la|nguages |
|00001860| 66 6f 72 20 74 68 69 72 | 74 79 20 79 65 61 72 73 |for thir|ty years|
|00001870| 2c 20 61 6e 64 20 74 68 | 61 74 20 75 6e 72 65 6c |, and th|at unrel|
|00001880| 69 61 62 69 6c 69 74 79 | 20 68 61 73 0a 6a 75 73 |iability| has.jus|
|00001890| 74 20 62 65 65 6e 20 61 | 63 63 65 70 74 65 64 20 |t been a|ccepted |
|000018a0| 61 73 20 74 68 65 20 73 | 74 61 74 65 20 6f 66 20 |as the s|tate of |
|000018b0| 74 68 65 20 61 72 74 2e | 0a 0a 0a 48 6f 77 20 64 |the art.|...How d|
|000018c0| 6f 65 73 20 53 63 68 65 | 6d 65 27 73 20 6e 65 77 |oes Sche|me's new|
|000018d0| 20 6d 61 63 72 6f 20 73 | 79 73 74 65 6d 20 6d 61 | macro s|ystem ma|
|000018e0| 6e 61 67 65 20 74 6f 20 | 61 76 6f 69 64 20 74 68 |nage to |avoid th|
|000018f0| 69 73 20 70 72 6f 62 6c | 65 6d 3f 0a 49 6e 20 65 |is probl|em?.In e|
|00001900| 66 66 65 63 74 2c 20 74 | 68 65 20 6d 61 63 72 6f |ffect, t|he macro|
|00001910| 20 65 78 70 61 6e 64 65 | 72 20 73 79 73 74 65 6d | expande|r system|
|00001920| 61 74 69 63 61 6c 6c 79 | 20 72 65 6e 61 6d 65 73 |atically| renames|
|00001930| 20 6c 6f 63 61 6c 20 76 | 61 72 69 61 62 6c 65 73 | local v|ariables|
|00001940| 0a 74 6f 20 61 76 6f 69 | 64 20 61 6c 6c 20 69 6e |.to avoi|d all in|
|00001950| 61 64 76 65 72 74 65 6e | 74 20 63 61 70 74 75 72 |adverten|t captur|
|00001960| 65 73 20 6f 66 20 62 6f | 75 6e 64 20 76 61 72 69 |es of bo|und vari|
|00001970| 61 62 6c 65 73 2c 20 73 | 6f 20 74 68 65 0a 6d 61 |ables, s|o the.ma|
|00001980| 63 72 6f 2d 65 78 70 61 | 6e 64 65 64 20 66 6f 72 |cro-expa|nded for|
|00001990| 6d 20 6f 66 20 74 68 65 | 20 65 78 70 72 65 73 73 |m of the| express|
|000019a0| 69 6f 6e 20 61 62 6f 76 | 65 20 77 69 6c 6c 20 62 |ion abov|e will b|
|000019b0| 65 20 73 6f 6d 65 74 68 | 69 6e 67 20 6c 69 6b 65 |e someth|ing like|
|000019c0| 0a 5c 62 65 67 69 6e 7b | 76 65 72 62 61 74 69 6d |.\begin{|verbatim|
|000019d0| 7d 0a 20 20 20 20 28 6c | 65 74 2a 20 28 28 63 6f |}. (l|et* ((co|
|000019e0| 6e 73 2e 31 20 28 6c 61 | 6d 62 64 61 20 28 6e 61 |ns.1 (la|mbda (na|
|000019f0| 6d 65 29 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |me). | |
|00001a00| 20 20 20 20 20 20 20 20 | 20 28 63 61 73 65 20 6e | | (case n|
|00001a10| 61 6d 65 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ame. | |
|00001a20| 20 20 20 20 20 20 20 20 | 20 20 20 28 28 70 68 69 | | ((phi|
|00001a30| 6c 29 20 20 27 28 22 74 | 68 72 65 65 2d 63 61 72 |l) '("t|hree-car|
|00001a40| 64 20 6d 6f 6e 74 65 22 | 29 29 0a 20 20 20 20 20 |d monte"|)). |
|00001a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001a60| 20 20 28 28 64 69 63 6b | 29 20 20 27 28 22 73 65 | ((dick|) '("se|
|00001a70| 63 72 65 74 20 70 6c 61 | 6e 20 74 6f 20 65 6e 64 |cret pla|n to end|
|00001a80| 20 74 68 65 20 77 61 72 | 22 0a 20 20 20 20 20 20 | the war|". |
|00001a90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001aa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 22 61 67 6e | | "agn|
|00001ab0| 65 77 22 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ew". | |
|00001ac0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ad0| 20 20 20 20 20 20 22 6e | 6f 74 20 61 20 63 72 6f | "n|ot a cro|
|00001ae0| 6f 6b 22 29 29 0a 20 20 | 20 20 20 20 20 20 20 20 |ok")). | |
|00001af0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 28 28 6a | | ((j|
|00001b00| 69 6d 6d 79 29 20 27 28 | 22 77 68 79 20 6e 6f 74 |immy) '(|"why not|
|00001b10| 20 74 68 65 20 62 65 73 | 74 22 29 29 0a 20 20 20 | the bes|t")). |
|00001b20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001b30| 20 20 20 20 28 28 72 6f | 6e 29 20 20 20 27 28 22 | ((ro|n) '("|
|00001b40| 61 62 6f 6c 69 73 68 20 | 74 68 65 20 64 72 61 66 |abolish |the draf|
|00001b50| 74 22 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t". | |
|00001b60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001b70| 20 20 20 20 20 22 62 61 | 6c 61 6e 63 65 20 74 68 | "ba|lance th|
|00001b80| 65 20 62 75 64 67 65 74 | 22 29 29 0a 20 20 20 20 |e budget|")). |
|00001b90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ba0| 20 20 20 28 65 6c 73 65 | 20 20 20 20 27 28 29 29 | (else| '())|
|00001bb0| 29 29 29 0a 20 20 20 20 | 20 20 20 20 20 20 20 28 |))). | (|
|00001bc0| 73 63 61 6d 73 20 28 63 | 6f 6e 73 2e 31 20 27 70 |scams (c|ons.1 'p|
|00001bd0| 68 69 6c 29 29 29 0a 20 | 20 20 20 20 20 28 73 65 |hil))). | (se|
|00001be0| 74 21 20 73 63 61 6d 73 | 20 28 63 6f 6e 73 20 28 |t! scams| (cons (|
|00001bf0| 63 61 72 20 28 63 6f 6e | 73 2e 31 20 27 6a 69 6d |car (con|s.1 'jim|
|00001c00| 6d 79 29 29 20 73 63 61 | 6d 73 29 29 0a 20 20 20 |my)) sca|ms)). |
|00001c10| 20 20 20 28 73 65 74 21 | 20 73 63 61 6d 73 20 28 | (set!| scams (|
|00001c20| 63 6f 6e 73 20 28 63 61 | 64 72 20 28 63 6f 6e 73 |cons (ca|dr (cons|
|00001c30| 2e 31 20 27 72 6f 6e 29 | 29 20 73 63 61 6d 73 29 |.1 'ron)|) scams)|
|00001c40| 29 0a 20 20 20 20 20 20 | 73 63 61 6d 73 29 0a 5c |). |scams).\|
|00001c50| 65 6e 64 7b 76 65 72 62 | 61 74 69 6d 7d 0a 0a 0a |end{verb|atim}...|
|00001c60| 41 20 6d 61 63 72 6f 20 | 73 79 73 74 65 6d 20 74 |A macro |system t|
|00001c70| 68 61 74 20 61 76 6f 69 | 64 73 20 69 6e 61 64 76 |hat avoi|ds inadv|
|00001c80| 65 72 74 65 6e 74 20 63 | 61 70 74 75 72 65 73 20 |ertent c|aptures |
|00001c90| 74 68 72 6f 75 67 68 20 | 73 79 73 74 65 6d 61 74 |through |systemat|
|00001ca0| 69 63 0a 72 65 6e 61 6d | 69 6e 67 20 69 73 20 73 |ic.renam|ing is s|
|00001cb0| 61 69 64 20 74 6f 20 62 | 65 20 7b 5c 65 6d 20 68 |aid to b|e {\em h|
|00001cc0| 79 67 69 65 6e 69 63 7d | 2e 20 20 45 75 67 65 6e |ygienic}|. Eugen|
|00001cd0| 65 20 4b 6f 68 6c 62 65 | 63 6b 65 72 20 64 65 76 |e Kohlbe|cker dev|
|00001ce0| 65 6c 6f 70 65 64 0a 61 | 6e 64 20 69 6d 70 6c 65 |eloped.a|nd imple|
|00001cf0| 6d 65 6e 74 65 64 20 74 | 68 65 20 66 69 72 73 74 |mented t|he first|
|00001d00| 20 68 79 67 69 65 6e 69 | 63 20 6d 61 63 72 6f 20 | hygieni|c macro |
|00001d10| 73 79 73 74 65 6d 20 66 | 6f 72 20 68 69 73 20 31 |system f|or his 1|
|00001d20| 39 38 36 20 50 68 44 0a | 64 69 73 73 65 72 74 61 |986 PhD.|disserta|
|00001d30| 74 69 6f 6e 20 5b 5c 6b | 6f 68 6c 62 65 63 6b 65 |tion [\k|ohlbecke|
|00001d40| 72 5d 2e 0a 49 6e 20 31 | 39 38 38 20 74 68 65 20 |r]..In 1|988 the |
|00001d50| 53 63 68 65 6d 65 20 63 | 6f 6d 6d 75 6e 69 74 79 |Scheme c|ommunity|
|00001d60| 20 61 73 6b 65 64 20 61 | 20 66 6f 75 72 2d 70 65 | asked a| four-pe|
|00001d70| 72 73 6f 6e 0a 63 6f 6d | 6d 69 74 74 65 65 20 74 |rson.com|mittee t|
|00001d80| 6f 20 64 65 73 69 67 6e | 20 61 20 68 79 67 69 65 |o design| a hygie|
|00001d90| 6e 69 63 20 6d 61 63 72 | 6f 20 73 79 73 74 65 6d |nic macr|o system|
|00001da0| 20 66 6f 72 20 69 6e 63 | 6c 75 73 69 6f 6e 0a 69 | for inc|lusion.i|
|00001db0| 6e 20 74 68 65 20 52 65 | 76 69 73 65 64 24 5e 34 |n the Re|vised$^4|
|00001dc0| 24 20 52 65 70 6f 72 74 | 2e 0a 49 6e 20 31 39 39 |$ Report|..In 199|
|00001dd0| 30 20 4a 6f 6e 61 74 68 | 61 6e 20 52 65 65 73 20 |0 Jonath|an Rees |
|00001de0| 61 6e 64 20 49 20 64 65 | 76 65 6c 6f 70 65 64 0a |and I de|veloped.|
|00001df0| 61 20 6d 6f 72 65 20 67 | 65 6e 65 72 61 6c 20 61 |a more g|eneral a|
|00001e00| 6e 64 20 65 66 66 69 63 | 69 65 6e 74 20 66 6f 72 |nd effic|ient for|
|00001e10| 6d 20 6f 66 20 4b 6f 68 | 6c 62 65 63 6b 65 72 27 |m of Koh|lbecker'|
|00001e20| 73 20 61 6c 67 6f 72 69 | 74 68 6d 2c 20 77 68 69 |s algori|thm, whi|
|00001e30| 63 68 0a 4a 6f 6e 61 74 | 68 61 6e 20 75 73 65 64 |ch.Jonat|han used|
|00001e40| 20 74 6f 20 69 6d 70 6c | 65 6d 65 6e 74 20 61 20 | to impl|ement a |
|00001e50| 70 72 6f 74 6f 74 79 70 | 65 20 6f 66 20 74 68 65 |prototyp|e of the|
|00001e60| 20 53 63 68 65 6d 65 20 | 6d 61 63 72 6f 20 73 79 | Scheme |macro sy|
|00001e70| 73 74 65 6d 0a 5b 5c 6d | 61 63 72 6f 73 74 68 61 |stem.[\m|acrostha|
|00001e80| 74 77 6f 72 6b 5d 2e 0a | 0a 0a 54 68 65 20 52 65 |twork]..|..The Re|
|00001e90| 76 69 73 65 64 24 5e 34 | 24 20 52 65 70 6f 72 74 |vised$^4|$ Report|
|00001ea0| 20 73 70 65 63 69 66 69 | 65 73 20 74 68 65 20 73 | specifi|es the s|
|00001eb0| 79 6e 74 61 78 20 61 6e | 64 20 73 65 6d 61 6e 74 |yntax an|d semant|
|00001ec0| 69 63 73 20 6f 66 20 61 | 0a 68 79 67 69 65 6e 69 |ics of a|.hygieni|
|00001ed0| 63 20 6d 61 63 72 6f 20 | 73 79 73 74 65 6d 2c 20 |c macro |system, |
|00001ee0| 62 75 74 20 64 6f 65 73 | 20 6e 6f 74 20 70 72 65 |but does| not pre|
|00001ef0| 73 63 72 69 62 65 20 61 | 6e 79 20 70 61 72 74 69 |scribe a|ny parti|
|00001f00| 63 75 6c 61 72 20 61 6c | 67 6f 72 69 74 68 6d 2e |cular al|gorithm.|
|00001f10| 0a 54 68 65 20 52 65 76 | 69 73 65 64 24 5e 34 24 |.The Rev|ised$^4$|
|00001f20| 20 52 65 70 6f 72 74 20 | 7b 5c 65 6d 20 64 6f 65 | Report |{\em doe|
|00001f30| 73 7d 20 64 65 73 63 72 | 69 62 65 20 61 20 6e 6f |s} descr|ibe a no|
|00001f40| 6e 2d 68 79 67 69 65 6e | 69 63 2c 20 6c 6f 77 2d |n-hygien|ic, low-|
|00001f50| 6c 65 76 65 6c 0a 6d 61 | 63 72 6f 20 66 61 63 69 |level.ma|cro faci|
|00001f60| 6c 69 74 79 20 74 68 61 | 74 20 7b 5c 65 6d 20 63 |lity tha|t {\em c|
|00001f70| 6f 75 6c 64 7d 20 62 65 | 20 75 73 65 64 20 74 6f |ould} be| used to|
|00001f80| 20 69 6d 70 6c 65 6d 65 | 6e 74 20 74 68 65 20 68 | impleme|nt the h|
|00001f90| 79 67 69 65 6e 69 63 20 | 6d 61 63 72 6f 0a 73 79 |ygienic |macro.sy|
|00001fa0| 73 74 65 6d 20 49 20 68 | 61 76 65 20 62 65 65 6e |stem I h|ave been|
|00001fb0| 20 64 65 73 63 72 69 62 | 69 6e 67 2c 20 62 75 74 | describ|ing, but|
|00001fc0| 20 67 6f 65 73 20 6f 6e | 20 74 6f 20 6e 6f 74 65 | goes on| to note|
|00001fd0| 20 74 68 61 74 20 74 68 | 69 73 20 70 61 72 74 69 | that th|is parti|
|00001fe0| 63 75 6c 61 72 0a 6c 6f | 77 2d 6c 65 76 65 6c 20 |cular.lo|w-level |
|00001ff0| 66 61 63 69 6c 69 74 79 | 20 60 60 69 73 20 62 75 |facility| ``is bu|
|00002000| 74 20 6f 6e 65 20 6f 66 | 20 73 65 76 65 72 61 6c |t one of| several|
|00002010| 20 6c 6f 77 2d 6c 65 76 | 65 6c 20 66 61 63 69 6c | low-lev|el facil|
|00002020| 69 74 69 65 73 20 74 68 | 61 74 0a 68 61 76 65 20 |ities th|at.have |
|00002030| 62 65 65 6e 20 64 65 73 | 69 67 6e 65 64 20 61 6e |been des|igned an|
|00002040| 64 20 69 6d 70 6c 65 6d | 65 6e 74 65 64 20 74 6f |d implem|ented to|
|00002050| 20 63 6f 6d 70 6c 65 6d | 65 6e 74 27 27 20 53 63 | complem|ent'' Sc|
|00002060| 68 65 6d 65 27 73 20 68 | 79 67 69 65 6e 69 63 0a |heme's h|ygienic.|
|00002070| 6d 61 63 72 6f 20 73 79 | 73 74 65 6d 2e 20 20 54 |macro sy|stem. T|
|00002080| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 61 72 74 |he follo|wing art|
|00002090| 69 63 6c 65 73 20 64 65 | 73 63 72 69 62 65 20 74 |icles de|scribe t|
|000020a0| 77 6f 20 6d 6f 72 65 20 | 6f 66 20 74 68 65 6d 2e |wo more |of them.|
|000020b0| 0a 0a 0a 42 65 66 6f 72 | 65 20 6d 6f 76 69 6e 67 |...Befor|e moving|
|000020c0| 20 6f 6e 20 74 6f 20 74 | 68 65 20 6c 6f 77 2d 6c | on to t|he low-l|
|000020d0| 65 76 65 6c 20 66 61 63 | 69 6c 69 74 69 65 73 2c |evel fac|ilities,|
|000020e0| 20 49 20 77 61 6e 74 20 | 74 6f 20 73 68 6f 77 20 | I want |to show |
|000020f0| 79 6f 75 20 6d 6f 72 65 | 0a 6f 66 20 74 68 65 20 |you more|.of the |
|00002100| 70 6f 77 65 72 20 6f 66 | 20 53 63 68 65 6d 65 27 |power of| Scheme'|
|00002110| 73 20 68 79 67 69 65 6e | 69 63 20 6d 61 63 72 6f |s hygien|ic macro|
|00002120| 20 73 79 73 74 65 6d 2e | 20 20 46 69 72 73 74 20 | system.| First |
|00002130| 6c 65 74 20 75 73 20 63 | 6f 6e 73 69 64 65 72 0a |let us c|onsider.|
|00002140| 61 20 73 69 6d 70 6c 69 | 66 69 65 64 20 66 6f 72 |a simpli|fied for|
|00002150| 6d 20 6f 66 20 43 6f 6d | 6d 6f 6e 20 4c 69 73 70 |m of Com|mon Lisp|
|00002160| 27 73 20 5c 63 6f 64 65 | 7b 73 65 74 66 7d 20 6d |'s \code|{setf} m|
|00002170| 61 63 72 6f 2e 20 20 57 | 69 74 68 20 74 68 65 20 |acro. W|ith the |
|00002180| 53 63 68 65 6d 65 0a 6d | 61 63 72 6f 20 73 79 73 |Scheme.m|acro sys|
|00002190| 74 65 6d 20 74 68 65 72 | 65 20 61 72 65 20 6e 6f |tem ther|e are no|
|000021a0| 20 72 65 73 65 72 76 65 | 64 20 77 6f 72 64 73 2c | reserve|d words,|
|000021b0| 20 73 6f 20 77 65 20 63 | 61 6e 20 72 65 64 65 66 | so we c|an redef|
|000021c0| 69 6e 65 20 5c 63 6f 64 | 65 7b 73 65 74 21 7d 0a |ine \cod|e{set!}.|
|000021d0| 6c 6f 63 61 6c 6c 79 20 | 61 73 20 69 6e 0a 5c 62 |locally |as in.\b|
|000021e0| 65 67 69 6e 7b 76 65 72 | 62 61 74 69 6d 7d 0a 20 |egin{ver|batim}. |
|000021f0| 20 20 20 28 6c 65 74 2d | 73 79 6e 74 61 78 0a 20 | (let-|syntax. |
|00002200| 20 20 20 20 20 28 28 73 | 65 74 21 20 28 73 79 6e | ((s|et! (syn|
|00002210| 74 61 78 2d 72 75 6c 65 | 73 20 28 63 61 72 20 63 |tax-rule|s (car c|
|00002220| 64 72 20 76 65 63 74 6f | 72 2d 72 65 66 29 0a 20 |dr vecto|r-ref). |
|00002230| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 28 28 | | ((|
|00002240| 73 65 74 21 20 28 63 61 | 72 20 78 29 20 79 29 20 |set! (ca|r x) y) |
|00002250| 20 20 20 20 20 20 20 20 | 20 28 73 65 74 2d 63 61 | | (set-ca|
|00002260| 72 21 20 78 20 79 29 29 | 0a 20 20 20 20 20 20 20 |r! x y))|. |
|00002270| 20 20 20 20 20 20 20 20 | 28 28 73 65 74 21 20 28 | |((set! (|
|00002280| 63 64 72 20 78 29 20 79 | 29 20 20 20 20 20 20 20 |cdr x) y|) |
|00002290| 20 20 20 28 73 65 74 2d | 63 64 72 21 20 78 20 79 | (set-|cdr! x y|
|000022a0| 29 29 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |)). | |
|000022b0| 20 20 28 28 73 65 74 21 | 20 28 76 65 63 74 6f 72 | ((set!| (vector|
|000022c0| 2d 72 65 66 20 78 20 65 | 29 20 79 29 20 28 76 65 |-ref x e|) y) (ve|
|000022d0| 63 74 6f 72 2d 73 65 74 | 21 20 78 20 65 20 79 29 |ctor-set|! x e y)|
|000022e0| 29 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |). | |
|000022f0| 20 28 28 73 65 74 21 20 | 78 20 79 29 20 20 20 20 | ((set! |x y) |
|00002300| 20 20 20 20 20 20 20 20 | 20 20 20 20 28 73 65 74 | | (set|
|00002310| 21 20 78 20 79 29 29 29 | 29 29 0a 20 20 20 20 20 |! x y)))|)). |
|00002320| 20 28 6c 65 74 2a 20 28 | 28 64 61 79 73 20 28 6c | (let* (|(days (l|
|00002330| 69 73 74 20 27 6d 6f 6e | 64 61 79 20 27 77 65 64 |ist 'mon|day 'wed|
|00002340| 6e 65 73 64 61 79 20 27 | 66 72 69 64 61 79 29 29 |nesday '|friday))|
|00002350| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 28 64 |. | (d|
|00002360| 61 79 31 20 27 73 75 6e | 64 61 79 29 29 0a 20 20 |ay1 'sun|day)). |
|00002370| 20 20 20 20 20 20 28 73 | 65 74 21 20 28 63 61 72 | (s|et! (car|
|00002380| 20 64 61 79 73 29 20 27 | 74 75 65 73 64 61 79 29 | days) '|tuesday)|
|00002390| 0a 20 20 20 20 20 20 20 | 20 28 73 65 74 21 20 64 |. | (set! d|
|000023a0| 61 79 31 20 28 63 61 72 | 20 64 61 79 73 29 29 0a |ay1 (car| days)).|
|000023b0| 20 20 20 20 20 20 20 20 | 64 61 79 31 29 29 0a 5c | |day1)).\|
|000023c0| 65 6e 64 7b 76 65 72 62 | 61 74 69 6d 7d 0a 54 68 |end{verb|atim}.Th|
|000023d0| 65 20 5c 63 6f 64 65 7b | 28 63 61 72 20 63 64 72 |e \code{|(car cdr|
|000023e0| 20 76 65 63 74 6f 72 2d | 72 65 66 29 7d 20 66 6f | vector-|ref)} fo|
|000023f0| 6c 6c 6f 77 69 6e 67 20 | 5c 63 6f 64 65 7b 73 79 |llowing |\code{sy|
|00002400| 6e 74 61 78 2d 72 75 6c | 65 73 7d 0a 6d 65 61 6e |ntax-rul|es}.mean|
|00002410| 73 20 74 68 61 74 20 5c | 63 6f 64 65 7b 63 61 72 |s that \|code{car|
|00002420| 7d 2c 20 5c 63 6f 64 65 | 7b 63 64 72 7d 2c 20 61 |}, \code|{cdr}, a|
|00002430| 6e 64 20 5c 63 6f 64 65 | 7b 76 65 63 74 6f 72 2d |nd \code|{vector-|
|00002440| 72 65 66 7d 20 61 72 65 | 0a 6e 6f 74 20 70 61 74 |ref} are|.not pat|
|00002450| 74 65 72 6e 20 76 61 72 | 69 61 62 6c 65 73 2e 20 |tern var|iables. |
|00002460| 20 54 68 65 79 20 63 61 | 6e 20 6d 61 74 63 68 20 | They ca|n match |
|00002470| 6f 6e 6c 79 20 74 68 65 | 6d 73 65 6c 76 65 73 2e |only the|mselves.|
|00002480| 0a 54 68 65 20 75 73 65 | 20 6f 66 20 5c 63 6f 64 |.The use| of \cod|
|00002490| 65 7b 6c 65 74 2d 73 79 | 6e 74 61 78 7d 20 69 6e |e{let-sy|ntax} in|
|000024a0| 73 74 65 61 64 20 6f 66 | 20 5c 63 6f 64 65 7b 6c |stead of| \code{l|
|000024b0| 65 74 72 65 63 2d 73 79 | 6e 74 61 78 7d 0a 6d 65 |etrec-sy|ntax}.me|
|000024c0| 61 6e 73 20 74 68 61 74 | 20 74 68 65 20 5c 63 6f |ans that| the \co|
|000024d0| 64 65 7b 6c 65 74 2d 73 | 79 6e 74 61 78 7d 20 6d |de{let-s|yntax} m|
|000024e0| 61 63 72 6f 20 69 73 20 | 6e 6f 74 20 72 65 63 75 |acro is |not recu|
|000024f0| 72 73 69 76 65 2c 20 73 | 6f 0a 69 74 20 63 61 6e |rsive, s|o.it can|
|00002500| 20 72 65 66 65 72 20 74 | 6f 20 74 68 65 20 6f 75 | refer t|o the ou|
|00002510| 74 65 72 20 64 65 66 69 | 6e 69 74 69 6f 6e 20 6f |ter defi|nition o|
|00002520| 66 20 5c 63 6f 64 65 7b | 73 65 74 21 7d 20 69 6e |f \code{|set!} in|
|00002530| 20 74 68 65 0a 6c 61 73 | 74 20 72 75 6c 65 20 77 | the.las|t rule w|
|00002540| 69 74 68 6f 75 74 20 63 | 69 72 63 75 6c 61 72 69 |ithout c|irculari|
|00002550| 74 79 2e 0a 0a 0a 49 6e | 20 43 6f 6d 6d 6f 6e 20 |ty....In| Common |
|00002560| 4c 69 73 70 2c 20 5c 63 | 6f 64 65 7b 28 73 65 74 |Lisp, \c|ode{(set|
|00002570| 66 20 28 63 61 72 20 64 | 61 79 73 29 20 27 74 75 |f (car d|ays) 'tu|
|00002580| 65 73 64 61 79 29 7d 20 | 77 69 6c 6c 20 6e 6f 74 |esday)} |will not|
|00002590| 0a 62 65 20 65 78 70 61 | 6e 64 65 64 20 69 66 20 |.be expa|nded if |
|000025a0| 69 74 20 6f 63 63 75 72 | 73 20 77 69 74 68 69 6e |it occur|s within|
|000025b0| 20 61 20 6c 6f 63 61 6c | 20 62 69 6e 64 69 6e 67 | a local| binding|
|000025c0| 20 66 6f 72 20 5c 63 6f | 64 65 7b 63 61 72 7d 2e | for \co|de{car}.|
|000025d0| 0a 28 41 74 20 6c 65 61 | 73 74 20 74 68 61 74 20 |.(At lea|st that |
|000025e0| 69 73 20 73 6f 20 61 63 | 63 6f 72 64 69 6e 67 20 |is so ac|cording |
|000025f0| 74 6f 20 5c 63 6f 64 65 | 7b 46 55 4e 43 54 49 4f |to \code|{FUNCTIO|
|00002600| 4e 2d 4e 41 4d 45 3a 53 | 4d 41 4c 4c 7d 2e 0a 4f |N-NAME:S|MALL}..O|
|00002610| 6e 20 74 68 65 20 6f 74 | 68 65 72 20 68 61 6e 64 |n the ot|her hand|
|00002620| 2c 20 74 68 65 20 63 6f | 6e 73 65 71 75 65 6e 63 |, the co|nsequenc|
|00002630| 65 73 20 61 72 65 20 73 | 75 70 70 6f 73 65 64 20 |es are s|upposed |
|00002640| 74 6f 20 62 65 20 75 6e | 64 65 66 69 6e 65 64 0a |to be un|defined.|
|00002650| 69 66 20 5c 63 6f 64 65 | 7b 63 61 72 7d 20 69 73 |if \code|{car} is|
|00002660| 20 62 6f 75 6e 64 20 6c | 6f 63 61 6c 6c 79 2e 20 | bound l|ocally. |
|00002670| 20 50 65 72 68 61 70 73 | 20 73 6f 6d 65 20 43 6f | Perhaps| some Co|
|00002680| 6d 6d 6f 6e 20 4c 69 73 | 70 0a 77 69 7a 61 72 64 |mmon Lis|p.wizard|
|00002690| 20 63 61 6e 20 65 78 70 | 6c 61 69 6e 20 74 68 69 | can exp|lain thi|
|000026a0| 73 20 74 6f 20 6d 65 2e | 29 20 20 54 68 65 20 70 |s to me.|) The p|
|000026b0| 75 72 70 6f 73 65 20 6f | 66 20 74 68 69 73 20 72 |urpose o|f this r|
|000026c0| 75 6c 65 0a 69 6e 20 43 | 6f 6d 6d 6f 6e 20 4c 69 |ule.in C|ommon Li|
|000026d0| 73 70 20 69 73 20 74 6f | 20 65 6e 73 75 72 65 20 |sp is to| ensure |
|000026e0| 74 68 61 74 20 74 68 65 | 20 73 63 6f 70 65 20 6f |that the| scope o|
|000026f0| 66 20 61 20 5c 63 6f 64 | 65 7b 73 65 74 66 7d 0a |f a \cod|e{setf}.|
|00002700| 6d 65 74 68 6f 64 20 74 | 68 61 74 20 69 73 20 61 |method t|hat is a|
|00002710| 73 73 6f 63 69 61 74 65 | 64 20 77 69 74 68 20 61 |ssociate|d with a|
|00002720| 20 66 75 6e 63 74 69 6f | 6e 20 64 6f 65 73 20 6e | functio|n does n|
|00002730| 6f 74 20 65 78 63 65 65 | 64 20 74 68 65 0a 73 63 |ot excee|d the.sc|
|00002740| 6f 70 65 20 6f 66 20 74 | 68 65 20 66 75 6e 63 74 |ope of t|he funct|
|00002750| 69 6f 6e 20 69 74 73 65 | 6c 66 2e 0a 0a 0a 54 68 |ion itse|lf....Th|
|00002760| 69 73 20 6c 69 6d 69 74 | 61 74 69 6f 6e 20 6f 66 |is limit|ation of|
|00002770| 20 74 68 65 20 73 63 6f | 70 65 20 6f 66 20 61 20 | the sco|pe of a |
|00002780| 5c 63 6f 64 65 7b 73 65 | 74 21 7d 20 6d 65 74 68 |\code{se|t!} meth|
|00002790| 6f 64 20 77 69 6c 6c 0a | 62 65 20 65 6e 66 6f 72 |od will.|be enfor|
|000027a0| 63 65 64 20 61 75 74 6f | 6d 61 74 69 63 61 6c 6c |ced auto|maticall|
|000027b0| 79 20 62 79 20 74 68 65 | 20 53 63 68 65 6d 65 20 |y by the| Scheme |
|000027c0| 6d 61 63 72 6f 20 73 79 | 73 74 65 6d 2c 0a 62 65 |macro sy|stem,.be|
|000027d0| 63 61 75 73 65 20 74 68 | 65 20 5c 63 6f 64 65 7b |cause th|e \code{|
|000027e0| 63 61 72 7d 20 69 6e 20 | 74 68 65 20 70 61 74 74 |car} in |the patt|
|000027f0| 65 72 6e 20 77 69 6c 6c | 20 6d 61 74 63 68 20 61 |ern will| match a|
|00002800| 20 5c 63 6f 64 65 7b 63 | 61 72 7d 0a 69 6e 20 61 | \code{c|ar}.in a|
|00002810| 20 75 73 65 20 6f 6e 6c | 79 20 69 66 20 74 68 65 | use onl|y if the|
|00002820| 20 74 77 6f 20 6f 63 63 | 75 72 72 65 6e 63 65 73 | two occ|urrences|
|00002830| 20 6f 66 20 5c 63 6f 64 | 65 7b 63 61 72 7d 20 61 | of \cod|e{car} a|
|00002840| 72 65 20 77 69 74 68 69 | 6e 0a 74 68 65 20 73 63 |re withi|n.the sc|
|00002850| 6f 70 65 20 6f 66 20 74 | 68 65 20 73 61 6d 65 20 |ope of t|he same |
|00002860| 62 69 6e 64 69 6e 67 20 | 6f 66 20 5c 63 6f 64 65 |binding |of \code|
|00002870| 7b 63 61 72 7d 2e 20 20 | 53 69 6e 63 65 20 74 68 |{car}. |Since th|
|00002880| 69 73 20 73 63 6f 70 65 | 0a 69 73 20 6c 65 78 69 |is scope|.is lexi|
|00002890| 63 61 6c 20 28 77 68 65 | 74 68 65 72 20 6c 6f 63 |cal (whe|ther loc|
|000028a0| 61 6c 20 6f 72 20 67 6c | 6f 62 61 6c 29 2c 20 74 |al or gl|obal), t|
|000028b0| 68 65 20 53 63 68 65 6d | 65 20 6d 61 63 72 6f 20 |he Schem|e macro |
|000028c0| 73 79 73 74 65 6d 0a 67 | 65 6e 65 72 61 6c 69 7a |system.g|eneraliz|
|000028d0| 65 73 20 43 6f 6d 6d 6f | 6e 20 4c 69 73 70 27 73 |es Commo|n Lisp's|
|000028e0| 20 72 75 6c 65 20 66 6f | 72 20 5c 63 6f 64 65 7b | rule fo|r \code{|
|000028f0| 73 65 74 66 7d 20 69 6e | 20 74 68 65 20 77 61 79 |setf} in| the way|
|00002900| 20 74 68 61 74 0a 69 73 | 20 61 70 70 72 6f 70 72 | that.is| appropr|
|00002910| 69 61 74 65 20 66 6f 72 | 20 62 6c 6f 63 6b 2d 73 |iate for| block-s|
|00002920| 74 72 75 63 74 75 72 65 | 64 20 6c 61 6e 67 75 61 |tructure|d langua|
|00002930| 67 65 73 20 6c 69 6b 65 | 20 53 63 68 65 6d 65 2e |ges like| Scheme.|
|00002940| 0a 0a 0a 4f 66 20 63 6f | 75 72 73 65 2c 20 6e 6f |...Of co|urse, no|
|00002950| 6e 65 20 6f 66 20 74 68 | 69 73 20 69 73 20 73 70 |ne of th|is is sp|
|00002960| 65 63 69 61 6c 20 74 6f | 20 5c 63 6f 64 65 7b 73 |ecial to| \code{s|
|00002970| 65 74 66 7d 2e 20 20 53 | 63 68 65 6d 65 27 73 0a |etf}. S|cheme's.|
|00002980| 68 79 67 69 65 6e 69 63 | 20 6d 61 63 72 6f 20 73 |hygienic| macro s|
|00002990| 79 73 74 65 6d 20 69 73 | 20 61 20 67 65 6e 65 72 |ystem is| a gener|
|000029a0| 61 6c 20 6d 65 63 68 61 | 6e 69 73 6d 20 66 6f 72 |al mecha|nism for|
|000029b0| 20 64 65 66 69 6e 69 6e | 67 0a 73 79 6e 74 61 63 | definin|g.syntac|
|000029c0| 74 69 63 20 74 72 61 6e | 73 66 6f 72 6d 61 74 69 |tic tran|sformati|
|000029d0| 6f 6e 73 20 74 68 61 74 | 20 72 65 6c 69 61 62 6c |ons that| reliabl|
|000029e0| 79 20 6f 62 65 79 20 74 | 68 65 20 72 75 6c 65 73 |y obey t|he rules|
|000029f0| 20 6f 66 0a 6c 65 78 69 | 63 61 6c 20 73 63 6f 70 | of.lexi|cal scop|
|00002a00| 65 2e 0a 0a 0a 41 6e 6f | 74 68 65 72 20 28 72 61 |e....Ano|ther (ra|
|00002a10| 74 68 65 72 20 73 69 6c | 6c 79 29 20 65 78 61 6d |ther sil|ly) exam|
|00002a20| 70 6c 65 20 6d 69 67 68 | 74 20 68 65 6c 70 20 74 |ple migh|t help t|
|00002a30| 6f 20 6d 61 6b 65 20 74 | 68 65 20 70 6f 69 6e 74 |o make t|he point|
|00002a40| 3a 0a 5c 62 65 67 69 6e | 7b 76 65 72 62 61 74 69 |:.\begin|{verbati|
|00002a50| 6d 7d 0a 20 20 20 20 28 | 6c 65 74 20 28 28 63 61 |m}. (|let ((ca|
|00002a60| 72 20 63 64 72 29 0a 20 | 20 20 20 20 20 20 20 20 |r cdr). | |
|00002a70| 20 28 73 65 74 2d 63 61 | 72 21 20 73 65 74 2d 63 | (set-ca|r! set-c|
|00002a80| 64 72 21 29 0a 20 20 20 | 20 20 20 20 20 20 20 28 |dr!). | (|
|00002a90| 63 64 72 20 63 61 72 29 | 0a 20 20 20 20 20 20 20 |cdr car)|. |
|00002aa0| 20 20 20 28 73 65 74 2d | 63 64 72 21 20 73 65 74 | (set-|cdr! set|
|00002ab0| 2d 63 61 72 21 29 29 0a | 20 20 20 20 20 20 28 6c |-car!)).| (l|
|00002ac0| 65 74 2d 73 79 6e 74 61 | 78 0a 20 20 20 20 20 20 |et-synta|x. |
|00002ad0| 20 20 28 28 73 65 74 21 | 20 28 73 79 6e 74 61 78 | ((set!| (syntax|
|00002ae0| 2d 72 75 6c 65 73 20 28 | 63 61 72 20 63 64 72 20 |-rules (|car cdr |
|00002af0| 76 65 63 74 6f 72 2d 72 | 65 66 29 0a 20 20 20 20 |vector-r|ef). |
|00002b00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 28 28 73 | | ((s|
|00002b10| 65 74 21 20 28 63 61 72 | 20 78 29 20 79 29 20 20 |et! (car| x) y) |
|00002b20| 20 20 20 20 20 20 20 20 | 28 73 65 74 2d 63 61 72 | |(set-car|
|00002b30| 21 20 78 20 79 29 29 0a | 20 20 20 20 20 20 20 20 |! x y)).| |
|00002b40| 20 20 20 20 20 20 20 20 | 20 28 28 73 65 74 21 20 | | ((set! |
|00002b50| 28 63 64 72 20 78 29 20 | 79 29 20 20 20 20 20 20 |(cdr x) |y) |
|00002b60| 20 20 20 20 28 73 65 74 | 2d 63 64 72 21 20 78 20 | (set|-cdr! x |
|00002b70| 79 29 29 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |y)). | |
|00002b80| 20 20 20 20 20 28 28 73 | 65 74 21 20 28 76 65 63 | ((s|et! (vec|
|00002b90| 74 6f 72 2d 72 65 66 20 | 78 20 65 29 20 79 29 20 |tor-ref |x e) y) |
|00002ba0| 28 76 65 63 74 6f 72 2d | 73 65 74 21 20 78 20 65 |(vector-|set! x e|
|00002bb0| 20 79 29 29 0a 20 20 20 | 20 20 20 20 20 20 20 20 | y)). | |
|00002bc0| 20 20 20 20 20 20 28 28 | 73 65 74 21 20 78 20 79 | ((|set! x y|
|00002bd0| 29 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |) | |
|00002be0| 20 28 73 65 74 21 20 78 | 20 79 29 29 29 29 29 0a | (set! x| y))))).|
|00002bf0| 20 20 20 20 20 20 20 20 | 28 6c 65 74 20 28 28 64 | |(let ((d|
|00002c00| 61 79 73 20 28 6c 69 73 | 74 20 27 6d 6f 6e 64 61 |ays (lis|t 'monda|
|00002c10| 79 20 27 77 65 64 6e 65 | 73 64 61 79 20 27 66 72 |y 'wedne|sday 'fr|
|00002c20| 69 64 61 79 29 29 0a 20 | 20 20 20 20 20 20 20 20 |iday)). | |
|00002c30| 20 20 20 20 20 28 73 65 | 74 2d 63 61 72 21 20 28 | (se|t-car! (|
|00002c40| 6c 61 6d 62 64 61 20 28 | 29 20 31 37 29 29 29 0a |lambda (|) 17))).|
|00002c50| 20 20 20 20 20 20 20 20 | 20 20 28 73 65 74 21 20 | | (set! |
|00002c60| 28 63 61 72 20 64 61 79 | 73 29 20 27 74 75 65 73 |(car day|s) 'tues|
|00002c70| 64 61 79 29 0a 20 20 20 | 20 20 20 20 20 20 20 28 |day). | (|
|00002c80| 63 6f 6e 73 20 28 73 65 | 74 2d 63 61 72 21 29 20 |cons (se|t-car!) |
|00002c90| 64 61 79 73 29 29 29 29 | 0a 5c 65 6e 64 7b 76 65 |days))))|.\end{ve|
|00002ca0| 72 62 61 74 69 6d 7d 0a | 49 6e 20 53 63 68 65 6d |rbatim}.|In Schem|
|00002cb0| 65 20 74 68 69 73 20 65 | 76 61 6c 75 61 74 65 73 |e this e|valuates|
|00002cc0| 20 74 6f 20 5c 63 6f 64 | 65 7b 28 31 37 20 6d 6f | to \cod|e{(17 mo|
|00002cd0| 6e 64 61 79 20 2e 20 74 | 75 65 73 64 61 79 29 7d |nday . t|uesday)}|
|00002ce0| 2e 0a 54 68 69 73 20 69 | 73 20 65 61 73 79 20 74 |..This i|s easy t|
|00002cf0| 6f 20 73 65 65 20 69 66 | 20 79 6f 75 20 66 6f 72 |o see if| you for|
|00002d00| 67 65 74 20 65 76 65 72 | 79 74 68 69 6e 67 20 79 |get ever|ything y|
|00002d10| 6f 75 20 74 68 6f 75 67 | 68 74 0a 79 6f 75 20 6b |ou thoug|ht.you k|
|00002d20| 6e 65 77 20 61 62 6f 75 | 74 20 6d 61 63 72 6f 73 |new abou|t macros|
|00002d30| 2c 20 61 6e 64 20 72 65 | 6c 79 20 6f 6e 6c 79 20 |, and re|ly only |
|00002d40| 6f 6e 20 74 68 65 20 66 | 61 63 74 20 74 68 61 74 |on the f|act that|
|00002d50| 20 61 6c 6c 0a 28 6e 6f | 6e 2d 70 61 74 74 65 72 | all.(no|n-patter|
|00002d60| 6e 2d 76 61 72 69 61 62 | 6c 65 29 20 69 64 65 6e |n-variab|le) iden|
|00002d70| 74 69 66 69 65 72 73 20 | 69 6e 20 74 68 65 20 6d |tifiers |in the m|
|00002d80| 61 63 72 6f 20 64 65 66 | 69 6e 69 74 69 6f 6e 2c |acro def|inition,|
|00002d90| 0a 77 68 65 74 68 65 72 | 20 74 68 65 79 20 6f 63 |.whether| they oc|
|00002da0| 63 75 72 20 6f 6e 20 74 | 68 65 20 6c 65 66 74 20 |cur on t|he left |
|00002db0| 6f 72 20 6f 6e 20 74 68 | 65 20 72 69 67 68 74 20 |or on th|e right |
|00002dc0| 68 61 6e 64 20 73 69 64 | 65 0a 6f 66 20 61 20 73 |hand sid|e.of a s|
|00002dd0| 79 6e 74 61 78 20 72 75 | 6c 65 2c 20 61 72 65 20 |yntax ru|le, are |
|00002de0| 72 65 73 6f 6c 76 65 64 | 20 75 73 69 6e 67 20 53 |resolved| using S|
|00002df0| 63 68 65 6d 65 27 73 20 | 66 61 6d 69 6c 69 61 72 |cheme's |familiar|
|00002e00| 0a 6c 65 78 69 63 61 6c | 20 73 63 6f 70 65 20 72 |.lexical| scope r|
|00002e10| 75 6c 65 73 2e 0a 0a 0a | 41 6c 61 73 2c 20 49 20 |ules....|Alas, I |
|00002e20| 63 61 6e 6e 6f 74 20 65 | 61 73 69 6c 79 20 69 6d |cannot e|asily im|
|00002e30| 70 6c 65 6d 65 6e 74 20 | 61 6e 20 61 6e 61 6c 6f |plement |an analo|
|00002e40| 67 75 65 20 6f 66 20 43 | 6f 6d 6d 6f 6e 20 4c 69 |gue of C|ommon Li|
|00002e50| 73 70 27 73 0a 5c 63 6f | 64 65 7b 73 65 74 66 7d |sp's.\co|de{setf}|
|00002e60| 20 69 6e 20 53 63 68 65 | 6d 65 20 75 73 69 6e 67 | in Sche|me using|
|00002e70| 20 74 68 65 20 68 69 67 | 68 2d 6c 65 76 65 6c 20 | the hig|h-level |
|00002e80| 6d 61 63 72 6f 20 73 79 | 73 74 65 6d 2e 0a 41 6c |macro sy|stem..Al|
|00002e90| 74 68 6f 75 67 68 20 6c | 6f 63 61 6c 20 6d 61 63 |though l|ocal mac|
|00002ea0| 72 6f 73 20 63 61 6e 20 | 62 65 20 65 69 74 68 65 |ros can |be eithe|
|00002eb0| 72 20 72 65 63 75 72 73 | 69 76 65 0a 28 5c 63 6f |r recurs|ive.(\co|
|00002ec0| 64 65 7b 6c 65 74 72 65 | 63 2d 73 79 6e 74 61 78 |de{letre|c-syntax|
|00002ed0| 7d 29 0a 6f 72 20 6e 6f | 6e 2d 72 65 63 75 72 73 |}).or no|n-recurs|
|00002ee0| 69 76 65 20 28 5c 63 6f | 64 65 7b 6c 65 74 2d 73 |ive (\co|de{let-s|
|00002ef0| 79 6e 74 61 78 7d 29 2c | 20 67 6c 6f 62 61 6c 20 |yntax}),| global |
|00002f00| 6d 61 63 72 6f 73 20 61 | 72 65 0a 61 6c 77 61 79 |macros a|re.alway|
|00002f10| 73 20 72 65 63 75 72 73 | 69 76 65 20 28 5c 63 6f |s recurs|ive (\co|
|00002f20| 64 65 7b 64 65 66 69 6e | 65 2d 73 79 6e 74 61 78 |de{defin|e-syntax|
|00002f30| 7d 29 2e 20 20 54 68 69 | 73 20 73 68 6f 75 6c 64 |}). Thi|s should|
|00002f40| 20 62 65 0a 66 69 78 65 | 64 2e 0a 0a 0a 41 6e 6f | be.fixe|d....Ano|
|00002f50| 74 68 65 72 20 70 72 6f | 62 6c 65 6d 20 77 69 74 |ther pro|blem wit|
|00002f60| 68 20 6d 61 63 72 6f 73 | 20 69 6e 20 53 63 68 65 |h macros| in Sche|
|00002f70| 6d 65 20 69 73 20 74 68 | 61 74 20 73 6f 6d 65 20 |me is th|at some |
|00002f80| 6d 61 63 72 6f 73 0a 61 | 72 65 20 61 77 6b 77 61 |macros.a|re awkwa|
|00002f90| 72 64 20 6f 72 20 69 6d | 70 6f 73 73 69 62 6c 65 |rd or im|possible|
|00002fa0| 20 74 6f 20 64 65 73 63 | 72 69 62 65 20 75 73 69 | to desc|ribe usi|
|00002fb0| 6e 67 20 74 68 65 20 70 | 61 74 74 65 72 6e 0a 6c |ng the p|attern.l|
|00002fc0| 61 6e 67 75 61 67 65 2e | 20 20 53 75 70 70 6f 73 |anguage.| Suppos|
|00002fd0| 65 20 77 65 20 77 61 6e | 74 20 74 6f 20 64 65 66 |e we wan|t to def|
|00002fe0| 69 6e 65 20 61 20 5c 63 | 6f 64 65 7b 73 65 74 2a |ine a \c|ode{set*|
|00002ff0| 21 7d 20 6d 61 63 72 6f | 0a 74 6f 20 70 65 72 66 |!} macro|.to perf|
|00003000| 6f 72 6d 20 61 73 73 69 | 67 6e 6d 65 6e 74 73 20 |orm assi|gnments |
|00003010| 69 6e 20 70 61 72 61 6c | 6c 65 6c 2c 20 77 69 74 |in paral|lel, wit|
|00003020| 68 0a 5c 62 65 67 69 6e | 7b 76 65 72 62 61 74 69 |h.\begin|{verbati|
|00003030| 6d 7d 0a 20 20 20 20 28 | 73 65 74 2a 21 20 69 31 |m}. (|set*! i1|
|00003040| 20 65 31 20 69 32 20 65 | 32 20 2e 2e 2e 29 0a 5c | e1 i2 e|2 ...).\|
|00003050| 65 6e 64 7b 76 65 72 62 | 61 74 69 6d 7d 0a 65 78 |end{verb|atim}.ex|
|00003060| 70 61 6e 64 69 6e 67 20 | 69 6e 74 6f 0a 5c 62 65 |panding |into.\be|
|00003070| 67 69 6e 7b 76 65 72 62 | 61 74 69 6d 7d 0a 20 20 |gin{verb|atim}. |
|00003080| 20 20 28 6c 65 74 20 28 | 28 74 31 20 65 31 29 20 | (let (|(t1 e1) |
|00003090| 28 74 32 20 65 32 29 20 | 2e 2e 2e 29 0a 20 20 20 |(t2 e2) |...). |
|000030a0| 20 20 20 28 73 65 74 21 | 20 69 31 20 74 31 29 0a | (set!| i1 t1).|
|000030b0| 20 20 20 20 20 20 28 73 | 65 74 21 20 69 32 20 74 | (s|et! i2 t|
|000030c0| 32 29 0a 20 20 20 20 20 | 20 2e 2e 2e 29 0a 5c 65 |2). | ...).\e|
|000030d0| 6e 64 7b 76 65 72 62 61 | 74 69 6d 7d 0a 54 68 69 |nd{verba|tim}.Thi|
|000030e0| 73 20 69 73 20 68 61 72 | 64 20 74 6f 20 65 78 70 |s is har|d to exp|
|000030f0| 72 65 73 73 20 66 6f 72 | 20 74 77 6f 20 72 65 61 |ress for| two rea|
|00003100| 73 6f 6e 73 2e 20 20 54 | 68 65 20 66 69 72 73 74 |sons. T|he first|
|00003110| 20 69 73 20 74 68 61 74 | 0a 74 68 65 20 76 61 72 | is that|.the var|
|00003120| 69 61 62 6c 65 73 20 74 | 6f 20 62 65 20 61 73 73 |iables t|o be ass|
|00003130| 69 67 6e 65 64 20 6e 65 | 65 64 20 74 6f 20 62 65 |igned ne|ed to be|
|00003140| 20 70 61 69 72 65 64 20 | 75 70 20 77 69 74 68 20 | paired |up with |
|00003150| 74 68 65 0a 65 78 70 72 | 65 73 73 69 6f 6e 73 20 |the.expr|essions |
|00003160| 67 69 76 69 6e 67 20 74 | 68 65 69 72 20 6e 65 77 |giving t|heir new|
|00003170| 20 76 61 6c 75 65 73 2e | 20 20 54 68 65 20 73 65 | values.| The se|
|00003180| 63 6f 6e 64 20 64 69 66 | 66 69 63 75 6c 74 79 0a |cond dif|ficulty.|
|00003190| 69 73 20 74 68 61 74 20 | 74 68 65 20 6d 61 63 72 |is that |the macr|
|000031a0| 6f 20 6d 75 73 74 20 67 | 65 6e 65 72 61 74 65 20 |o must g|enerate |
|000031b0| 61 6e 20 69 6e 64 65 66 | 69 6e 69 74 65 20 6e 75 |an indef|inite nu|
|000031c0| 6d 62 65 72 20 6f 66 0a | 74 65 6d 70 6f 72 61 72 |mber of.|temporar|
|000031d0| 79 20 76 61 72 69 61 62 | 6c 65 73 2e 0a 0a 0a 54 |y variab|les....T|
|000031e0| 68 65 20 5c 63 6f 64 65 | 7b 73 65 74 2a 21 7d 20 |he \code|{set*!} |
|000031f0| 6d 61 63 72 6f 20 63 61 | 6e 20 62 65 20 64 65 66 |macro ca|n be def|
|00003200| 69 6e 65 64 20 75 73 69 | 6e 67 20 61 6e 20 61 75 |ined usi|ng an au|
|00003210| 78 69 6c 69 61 72 79 20 | 6d 61 63 72 6f 0a 74 6f |xiliary |macro.to|
|00003220| 20 70 65 72 66 6f 72 6d | 20 74 68 65 20 70 61 69 | perform| the pai|
|00003230| 72 69 6e 67 20 61 6e 64 | 20 74 6f 20 67 65 6e 65 |ring and| to gene|
|00003240| 72 61 74 65 20 74 68 65 | 20 74 65 6d 70 6f 72 61 |rate the| tempora|
|00003250| 72 69 65 73 2e 0a 41 6c | 74 68 6f 75 67 68 20 69 |ries..Al|though i|
|00003260| 74 20 6d 69 67 68 74 20 | 61 70 70 65 61 72 20 74 |t might |appear t|
|00003270| 68 61 74 20 74 68 65 20 | 73 61 6d 65 20 74 65 6d |hat the |same tem|
|00003280| 70 6f 72 61 72 79 20 69 | 73 20 62 65 69 6e 67 20 |porary i|s being |
|00003290| 75 73 65 64 0a 66 6f 72 | 20 65 61 63 68 20 61 73 |used.for| each as|
|000032a0| 73 69 67 6e 6d 65 6e 74 | 2c 20 74 68 65 20 68 79 |signment|, the hy|
|000032b0| 67 69 65 6e 69 63 20 6d | 61 63 72 6f 20 73 79 73 |gienic m|acro sys|
|000032c0| 74 65 6d 20 61 75 74 6f | 6d 61 74 69 63 61 6c 6c |tem auto|maticall|
|000032d0| 79 0a 72 65 6e 61 6d 65 | 73 20 65 61 63 68 20 62 |y.rename|s each b|
|000032e0| 69 6e 64 69 6e 67 20 6f | 63 63 75 72 72 65 6e 63 |inding o|ccurrenc|
|000032f0| 65 20 74 68 61 74 20 69 | 73 20 69 6e 73 65 72 74 |e that i|s insert|
|00003300| 65 64 20 62 79 20 61 20 | 6d 61 63 72 6f 2c 0a 74 |ed by a |macro,.t|
|00003310| 6f 67 65 74 68 65 72 20 | 77 69 74 68 20 61 6c 6c |ogether |with all|
|00003320| 20 6f 63 63 75 72 72 65 | 6e 63 65 73 20 77 69 74 | occurre|nces wit|
|00003330| 68 69 6e 20 69 74 73 20 | 73 63 6f 70 65 2e 0a 53 |hin its |scope..S|
|00003340| 69 6e 63 65 20 65 61 63 | 68 20 74 65 6d 70 6f 72 |ince eac|h tempor|
|00003350| 61 72 79 20 74 68 61 74 | 20 69 73 20 69 6e 73 65 |ary that| is inse|
|00003360| 72 74 65 64 20 62 79 20 | 74 68 65 20 61 75 78 69 |rted by |the auxi|
|00003370| 6c 69 61 72 79 20 6d 61 | 63 72 6f 0a 65 76 65 6e |liary ma|cro.even|
|00003380| 74 75 61 6c 6c 79 20 62 | 65 63 6f 6d 65 73 20 61 |tually b|ecomes a|
|00003390| 20 62 69 6e 64 69 6e 67 | 20 6f 63 63 75 72 72 65 | binding| occurre|
|000033a0| 6e 63 65 2c 20 65 61 63 | 68 20 77 69 6c 6c 20 62 |nce, eac|h will b|
|000033b0| 65 20 72 65 6e 61 6d 65 | 64 2e 0a 28 41 6d 61 7a |e rename|d..(Amaz|
|000033c0| 69 6e 67 20 62 75 74 20 | 74 72 75 65 2e 29 0a 5c |ing but |true.).\|
|000033d0| 62 65 67 69 6e 7b 76 65 | 72 62 61 74 69 6d 7d 0a |begin{ve|rbatim}.|
|000033e0| 20 20 20 20 28 64 65 66 | 69 6e 65 2d 73 79 6e 74 | (def|ine-synt|
|000033f0| 61 78 20 73 65 74 2a 21 | 0a 20 20 20 20 20 20 28 |ax set*!|. (|
|00003400| 73 79 6e 74 61 78 2d 72 | 75 6c 65 73 20 28 29 0a |syntax-r|ules ().|
|00003410| 20 20 20 20 20 20 20 20 | 28 28 73 65 74 2a 21 20 | |((set*! |
|00003420| 69 31 20 65 31 20 6d 6f | 72 65 20 2e 2e 2e 29 0a |i1 e1 mo|re ...).|
|00003430| 20 20 20 20 20 20 20 20 | 20 28 73 65 74 2a 21 2d | | (set*!-|
|00003440| 61 75 78 20 28 29 20 69 | 31 20 65 31 20 6d 6f 72 |aux () i|1 e1 mor|
|00003450| 65 20 2e 2e 2e 29 29 29 | 29 0a 0a 0a 20 20 20 20 |e ...)))|)... |
|00003460| 28 64 65 66 69 6e 65 2d | 73 79 6e 74 61 78 20 73 |(define-|syntax s|
|00003470| 65 74 2a 21 2d 61 75 78 | 0a 20 20 20 20 20 20 28 |et*!-aux|. (|
|00003480| 73 79 6e 74 61 78 2d 72 | 75 6c 65 73 20 28 29 0a |syntax-r|ules ().|
|00003490| 20 20 20 20 20 20 20 20 | 28 28 73 65 74 2a 21 2d | |((set*!-|
|000034a0| 61 75 78 20 28 28 69 31 | 20 65 31 20 74 31 29 20 |aux ((i1| e1 t1) |
|000034b0| 2e 2e 2e 29 29 0a 20 20 | 20 20 20 20 20 20 20 28 |...)). | (|
|000034c0| 6c 65 74 20 28 28 74 31 | 20 65 31 29 20 2e 2e 2e |let ((t1| e1) ...|
|000034d0| 29 0a 20 20 20 20 20 20 | 20 20 20 20 20 28 73 65 |). | (se|
|000034e0| 74 21 20 69 31 20 74 31 | 29 20 2e 2e 2e 29 29 0a |t! i1 t1|) ...)).|
|000034f0| 20 20 20 20 20 20 20 20 | 28 28 73 65 74 2a 21 2d | |((set*!-|
|00003500| 61 75 78 20 28 28 69 31 | 20 65 31 20 74 31 29 20 |aux ((i1| e1 t1) |
|00003510| 2e 2e 2e 29 20 69 32 20 | 65 32 20 6d 6f 72 65 20 |...) i2 |e2 more |
|00003520| 2e 2e 2e 29 0a 20 20 20 | 20 20 20 20 20 20 28 73 |...). | (s|
|00003530| 65 74 2a 21 2d 61 75 78 | 20 28 28 69 31 20 65 31 |et*!-aux| ((i1 e1|
|00003540| 20 74 31 29 20 2e 2e 2e | 20 28 69 32 20 65 32 20 | t1) ...| (i2 e2 |
|00003550| 6e 65 77 74 65 6d 70 29 | 29 20 6d 6f 72 65 20 2e |newtemp)|) more .|
|00003560| 2e 2e 29 29 29 29 0a 5c | 65 6e 64 7b 76 65 72 62 |..)))).\|end{verb|
|00003570| 61 74 69 6d 7d 0a 54 68 | 69 73 20 64 65 66 69 6e |atim}.Th|is defin|
|00003580| 69 74 69 6f 6e 20 6f 66 | 20 5c 63 6f 64 65 7b 73 |ition of| \code{s|
|00003590| 65 74 2a 21 7d 20 6d 61 | 79 20 62 65 20 63 6f 6d |et*!} ma|y be com|
|000035a0| 70 61 72 65 64 20 77 69 | 74 68 0a 74 68 65 20 5c |pared wi|th.the \|
|000035b0| 63 6f 64 65 7b 73 65 74 | 2a 21 7d 20 6d 61 63 72 |code{set|*!} macr|
|000035c0| 6f 20 74 68 61 74 20 69 | 73 20 64 65 66 69 6e 65 |o that i|s define|
|000035d0| 64 20 69 6e 20 74 68 65 | 20 52 65 76 69 73 65 64 |d in the| Revised|
|000035e0| 24 5e 34 24 0a 52 65 70 | 6f 72 74 20 75 73 69 6e |$^4$.Rep|ort usin|
|000035f0| 67 20 74 68 65 20 6c 6f | 77 2d 6c 65 76 65 6c 20 |g the lo|w-level |
|00003600| 6d 61 63 72 6f 20 73 79 | 73 74 65 6d 2e 20 20 41 |macro sy|stem. A|
|00003610| 6c 74 68 6f 75 67 68 20 | 5c 63 6f 64 65 7b 73 65 |lthough |\code{se|
|00003620| 74 2a 21 7d 0a 77 61 73 | 20 70 75 74 20 66 6f 72 |t*!}.was| put for|
|00003630| 74 68 20 61 73 20 61 6e | 20 65 78 61 6d 70 6c 65 |th as an| example|
|00003640| 20 6f 66 20 61 20 6d 61 | 63 72 6f 20 74 68 61 74 | of a ma|cro that|
|00003650| 20 77 6f 75 6c 64 20 62 | 65 20 65 61 73 69 65 72 | would b|e easier|
|00003660| 0a 74 6f 20 77 72 69 74 | 65 20 69 6e 20 61 20 6c |.to writ|e in a l|
|00003670| 6f 77 2d 6c 65 76 65 6c | 20 6d 61 63 72 6f 20 73 |ow-level| macro s|
|00003680| 79 73 74 65 6d 2c 20 49 | 20 70 72 65 66 65 72 20 |ystem, I| prefer |
|00003690| 74 68 65 20 68 69 67 68 | 2d 6c 65 76 65 6c 0a 64 |the high|-level.d|
|000036a0| 65 66 69 6e 69 74 69 6f | 6e 20 61 62 6f 76 65 2e |efinitio|n above.|
|000036b0| 0a 0a 0a 54 68 69 73 20 | 64 65 66 69 6e 69 74 69 |...This |definiti|
|000036c0| 6f 6e 20 77 6f 75 6c 64 | 20 62 65 20 6d 6f 72 65 |on would| be more|
|000036d0| 20 65 6c 65 67 61 6e 74 | 20 69 66 20 74 68 65 20 | elegant| if the |
|000036e0| 61 75 78 69 6c 69 61 72 | 79 20 6d 61 63 72 6f 20 |auxiliar|y macro |
|000036f0| 77 65 72 65 0a 6c 6f 63 | 61 6c 20 74 6f 0a 65 61 |were.loc|al to.ea|
|00003700| 63 68 20 75 73 65 20 6f | 66 20 5c 63 6f 64 65 7b |ch use o|f \code{|
|00003710| 73 65 74 2a 21 7d 2e 20 | 20 54 68 61 74 20 77 6f |set*!}. | That wo|
|00003720| 75 6c 64 20 62 65 20 6c | 65 73 73 20 65 66 66 69 |uld be l|ess effi|
|00003730| 63 69 65 6e 74 20 62 65 | 63 61 75 73 65 0a 74 68 |cient be|cause.th|
|00003740| 65 20 61 75 78 69 6c 69 | 61 72 79 20 6d 61 63 72 |e auxili|ary macr|
|00003750| 6f 20 77 6f 75 6c 64 20 | 68 61 76 65 20 74 6f 20 |o would |have to |
|00003760| 62 65 20 72 65 2d 63 6f | 6d 70 69 6c 65 64 20 66 |be re-co|mpiled f|
|00003770| 6f 72 20 65 61 63 68 0a | 75 73 65 2c 20 62 75 74 |or each.|use, but|
|00003780| 20 74 68 65 20 72 65 61 | 6c 20 72 65 61 73 6f 6e | the rea|l reason|
|00003790| 20 49 20 64 69 64 6e 27 | 74 20 75 73 65 20 61 20 | I didn'|t use a |
|000037a0| 6c 6f 63 61 6c 20 6d 61 | 63 72 6f 20 69 73 20 74 |local ma|cro is t|
|000037b0| 68 61 74 20 49 0a 63 61 | 6e 27 74 20 65 78 70 72 |hat I.ca|n't expr|
|000037c0| 65 73 73 20 74 68 65 20 | 6d 61 63 72 6f 20 49 20 |ess the |macro I |
|000037d0| 77 61 6e 74 20 75 73 69 | 6e 67 20 5c 63 6f 64 65 |want usi|ng \code|
|000037e0| 7b 73 79 6e 74 61 78 2d | 72 75 6c 65 73 7d 21 0a |{syntax-|rules}!.|
|000037f0| 0a 0a 54 68 65 20 70 72 | 6f 62 6c 65 6d 20 69 73 |..The pr|oblem is|
|00003800| 20 61 6e 6e 6f 79 69 6e | 67 6c 79 20 73 79 6e 74 | annoyin|gly synt|
|00003810| 61 63 74 69 63 3a 0a 49 | 66 20 49 20 74 72 69 65 |actic:.I|f I trie|
|00003820| 64 20 74 6f 20 75 73 65 | 20 5c 63 6f 64 65 7b 73 |d to use| \code{s|
|00003830| 79 6e 74 61 78 2d 72 75 | 6c 65 73 7d 20 74 6f 20 |yntax-ru|les} to |
|00003840| 73 61 79 20 74 68 61 74 | 0a 5c 63 6f 64 65 7b 73 |say that|.\code{s|
|00003850| 65 74 2a 21 7d 20 65 78 | 70 61 6e 64 73 20 69 6e |et*!} ex|pands in|
|00003860| 74 6f 20 61 20 5c 63 6f | 64 65 7b 6c 65 74 72 65 |to a \co|de{letre|
|00003870| 63 2d 73 79 6e 74 61 78 | 7d 20 74 68 61 74 20 64 |c-syntax|} that d|
|00003880| 65 66 69 6e 65 73 0a 5c | 63 6f 64 65 7b 73 65 74 |efines.\|code{set|
|00003890| 2a 21 2d 61 75 78 7d 2c | 20 74 68 65 6e 20 74 68 |*!-aux},| then th|
|000038a0| 65 20 73 65 76 65 6e 20 | 65 6c 6c 69 70 73 65 73 |e seven |ellipses|
|000038b0| 20 74 68 61 74 20 61 70 | 70 65 61 72 20 69 6e 20 | that ap|pear in |
|000038c0| 74 68 65 0a 64 65 66 69 | 6e 69 74 69 6f 6e 20 6f |the.defi|nition o|
|000038d0| 66 20 5c 63 6f 64 65 7b | 73 65 74 2a 21 2d 61 75 |f \code{|set*!-au|
|000038e0| 78 7d 20 77 6f 75 6c 64 | 20 61 70 70 65 61 72 20 |x} would| appear |
|000038f0| 6f 6e 20 74 68 65 20 72 | 69 67 68 74 20 68 61 6e |on the r|ight han|
|00003900| 64 0a 73 69 64 65 20 6f | 66 20 74 68 65 20 73 79 |d.side o|f the sy|
|00003910| 6e 74 61 78 20 72 75 6c | 65 20 66 6f 72 20 5c 63 |ntax rul|e for \c|
|00003920| 6f 64 65 7b 73 65 74 2a | 21 7d 2e 20 20 54 68 65 |ode{set*|!}. The|
|00003930| 20 6d 61 63 72 6f 20 65 | 78 70 61 6e 64 65 72 0a | macro e|xpander.|
|00003940| 77 6f 75 6c 64 20 74 72 | 79 20 74 6f 20 65 78 70 |would tr|y to exp|
|00003950| 61 6e 64 20 74 68 65 73 | 65 20 73 65 76 65 6e 20 |and thes|e seven |
|00003960| 65 6c 6c 69 70 73 65 73 | 20 77 68 65 6e 20 74 72 |ellipses| when tr|
|00003970| 61 6e 73 63 72 69 62 69 | 6e 67 20 74 68 65 0a 75 |anscribi|ng the.u|
|00003980| 73 65 20 6f 66 20 5c 63 | 6f 64 65 7b 73 65 74 2a |se of \c|ode{set*|
|00003990| 21 7d 2c 20 6a 75 73 74 | 20 61 73 20 69 74 20 65 |!}, just| as it e|
|000039a0| 78 70 61 6e 64 73 20 74 | 68 65 20 6f 6e 65 20 65 |xpands t|he one e|
|000039b0| 6c 6c 69 70 73 69 73 20 | 74 68 61 74 0a 61 70 70 |llipsis |that.app|
|000039c0| 65 61 72 73 20 6f 6e 20 | 74 68 65 20 72 69 67 68 |ears on |the righ|
|000039d0| 74 20 68 61 6e 64 20 73 | 69 64 65 20 6f 66 20 74 |t hand s|ide of t|
|000039e0| 68 65 20 73 79 6e 74 61 | 78 20 72 75 6c 65 20 66 |he synta|x rule f|
|000039f0| 6f 72 20 5c 63 6f 64 65 | 7b 73 65 74 2a 21 7d 0a |or \code|{set*!}.|
|00003a00| 61 62 6f 76 65 2e 20 20 | 53 6f 6d 65 68 6f 77 20 |above. |Somehow |
|00003a10| 74 68 65 20 6d 61 63 72 | 6f 20 65 78 70 61 6e 64 |the macr|o expand|
|00003a20| 65 72 20 6e 65 65 64 73 | 20 74 6f 20 6b 6e 6f 77 |er needs| to know|
|00003a30| 20 74 6f 20 65 78 70 61 | 6e 64 0a 74 68 61 74 20 | to expa|nd.that |
|00003a40| 6f 6e 65 20 65 6c 6c 69 | 70 73 69 73 2c 20 77 68 |one elli|psis, wh|
|00003a50| 69 6c 65 20 77 61 69 74 | 69 6e 67 20 75 6e 74 69 |ile wait|ing unti|
|00003a60| 6c 20 74 68 65 20 6c 6f | 63 61 6c 20 6d 61 63 72 |l the lo|cal macr|
|00003a70| 6f 20 69 73 20 75 73 65 | 64 0a 74 6f 20 65 78 70 |o is use|d.to exp|
|00003a80| 61 6e 64 20 74 68 65 20 | 6f 74 68 65 72 20 73 65 |and the |other se|
|00003a90| 76 65 6e 20 65 6c 6c 69 | 70 73 65 73 2e 20 20 41 |ven elli|pses. A|
|00003aa0| 20 73 69 6d 69 6c 61 72 | 20 70 72 6f 62 6c 65 6d | similar| problem|
|00003ab0| 0a 69 73 20 73 6f 6c 76 | 65 64 20 69 6e 20 5c 54 |.is solv|ed in \T|
|00003ac0| 65 58 7b 7d 20 62 79 20 | 61 6e 20 65 73 63 61 70 |eX{} by |an escap|
|00003ad0| 65 20 63 68 61 72 61 63 | 74 65 72 2c 20 61 6e 64 |e charac|ter, and|
|00003ae0| 20 74 68 69 73 20 73 6f | 6c 75 74 69 6f 6e 0a 73 | this so|lution.s|
|00003af0| 68 6f 75 6c 64 20 77 6f | 72 6b 20 69 6e 20 53 63 |hould wo|rk in Sc|
|00003b00| 68 65 6d 65 20 61 73 20 | 77 65 6c 6c 2e 0a 0a 0a |heme as |well....|
|00003b10| 54 68 65 20 6c 6f 77 2d | 6c 65 76 65 6c 20 73 79 |The low-|level sy|
|00003b20| 73 74 65 6d 20 64 65 73 | 63 72 69 62 65 64 20 69 |stem des|cribed i|
|00003b30| 6e 20 74 68 65 20 52 65 | 76 69 73 65 64 24 5e 34 |n the Re|vised$^4|
|00003b40| 24 20 52 65 70 6f 72 74 | 20 75 73 65 73 0a 5c 63 |$ Report| uses.\c|
|00003b50| 6f 64 65 7b 73 79 6e 74 | 61 78 7d 20 61 73 20 61 |ode{synt|ax} as a|
|00003b60| 6e 20 65 73 63 61 70 65 | 20 63 68 61 72 61 63 74 |n escape| charact|
|00003b70| 65 72 2e 20 20 53 6f 6d | 65 20 73 75 63 68 20 6d |er. Som|e such m|
|00003b80| 65 63 68 61 6e 69 73 6d | 0a 6e 65 65 64 73 20 74 |echanism|.needs t|
|00003b90| 6f 20 62 65 20 61 64 64 | 65 64 20 74 6f 20 74 68 |o be add|ed to th|
|00003ba0| 65 20 68 69 67 68 2d 6c | 65 76 65 6c 20 73 79 73 |e high-l|evel sys|
|00003bb0| 74 65 6d 2e 0a 0a 0a 44 | 65 73 70 69 74 65 20 74 |tem....D|espite t|
|00003bc0| 68 65 73 65 20 70 72 6f | 62 6c 65 6d 73 2c 20 5c |hese pro|blems, \|
|00003bd0| 63 6f 64 65 7b 73 79 6e | 74 61 78 2d 72 75 6c 65 |code{syn|tax-rule|
|00003be0| 73 7d 20 77 69 74 68 20 | 72 65 63 75 72 73 69 6f |s} with |recursio|
|00003bf0| 6e 20 69 73 20 72 65 61 | 73 6f 6e 61 62 6c 79 0a |n is rea|sonably.|
|00003c00| 65 78 70 72 65 73 73 69 | 76 65 2e 20 49 74 20 63 |expressi|ve. It c|
|00003c10| 61 6e 20 65 78 70 72 65 | 73 73 20 61 6c 6c 20 72 |an expre|ss all r|
|00003c20| 65 63 75 72 73 69 76 65 | 20 66 75 6e 63 74 69 6f |ecursive| functio|
|00003c30| 6e 73 20 6f 6e 20 6c 69 | 73 74 73 2c 20 77 68 65 |ns on li|sts, whe|
|00003c40| 72 65 0a 5c 63 6f 64 65 | 7b 63 6f 6e 73 7d 2c 20 |re.\code|{cons}, |
|00003c50| 5c 63 6f 64 65 7b 63 61 | 72 7d 2c 20 5c 63 6f 64 |\code{ca|r}, \cod|
|00003c60| 65 7b 63 64 72 7d 2c 20 | 5c 63 6f 64 65 7b 6e 75 |e{cdr}, |\code{nu|
|00003c70| 6c 6c 3f 7d 2c 20 61 6e | 64 0a 5c 63 6f 64 65 7b |ll?}, an|d.\code{|
|00003c80| 65 71 75 61 6c 3f 7d 20 | 6f 6e 20 6e 6f 6e 2d 6c |equal?} |on non-l|
|00003c90| 69 73 74 20 65 6c 65 6d | 65 6e 74 73 20 61 72 65 |ist elem|ents are|
|00003ca0| 20 74 68 65 20 62 61 73 | 65 20 66 75 6e 63 74 69 | the bas|e functi|
|00003cb0| 6f 6e 73 2e 0a 54 68 65 | 20 70 61 74 74 65 72 6e |ons..The| pattern|
|00003cc0| 20 6c 61 6e 67 75 61 67 | 65 20 63 61 6e 6e 6f 74 | languag|e cannot|
|00003cd0| 20 64 6f 20 6d 75 63 68 | 20 77 69 74 68 20 6e 6f | do much| with no|
|00003ce0| 6e 2d 6c 69 73 74 73 2c | 20 68 6f 77 65 76 65 72 |n-lists,| however|
|00003cf0| 2e 0a 49 74 20 63 61 6e | 6e 6f 74 20 74 61 6b 65 |..It can|not take|
|00003d00| 20 74 68 65 20 73 75 63 | 63 65 73 73 6f 72 20 6f | the suc|cessor o|
|00003d10| 66 20 61 20 6e 75 6d 65 | 72 61 6c 2c 20 66 6f 72 |f a nume|ral, for|
|00003d20| 20 65 78 61 6d 70 6c 65 | 2e 0a 0a 0a 54 68 65 20 | example|....The |
|00003d30| 70 72 69 6d 61 72 79 20 | 6c 69 6d 69 74 61 74 69 |primary |limitati|
|00003d40| 6f 6e 20 6f 66 20 74 68 | 65 20 68 79 67 69 65 6e |on of th|e hygien|
|00003d50| 69 63 20 6d 61 63 72 6f | 20 73 79 73 74 65 6d 20 |ic macro| system |
|00003d60| 69 73 20 74 68 61 74 0a | 69 74 20 69 73 20 74 68 |is that.|it is th|
|00003d70| 6f 72 6f 75 67 68 6c 79 | 20 68 79 67 69 65 6e 69 |oroughly| hygieni|
|00003d80| 63 2c 20 61 6e 64 20 74 | 68 75 73 20 63 61 6e 6e |c, and t|hus cann|
|00003d90| 6f 74 20 65 78 70 72 65 | 73 73 20 6d 61 63 72 6f |ot expre|ss macro|
|00003da0| 73 0a 74 68 61 74 20 62 | 69 6e 64 20 69 64 65 6e |s.that b|ind iden|
|00003db0| 74 69 66 69 65 72 73 20 | 69 6d 70 6c 69 63 69 74 |tifiers |implicit|
|00003dc0| 6c 79 2e 20 20 43 6f 6d | 6d 6f 6e 20 4c 69 73 70 |ly. Com|mon Lisp|
|00003dd0| 27 73 0a 5c 63 6f 64 65 | 7b 64 65 66 73 74 72 75 |'s.\code|{defstru|
|00003de0| 63 74 7d 20 69 73 20 61 | 6e 20 65 78 61 6d 70 6c |ct} is a|n exampl|
|00003df0| 65 20 6f 66 20 61 20 6e | 6f 6e 2d 68 79 67 69 65 |e of a n|on-hygie|
|00003e00| 6e 69 63 20 6d 61 63 72 | 6f 2c 0a 73 69 6e 63 65 |nic macr|o,.since|
|00003e10| 20 69 74 20 69 6d 70 6c | 69 63 69 74 6c 79 20 64 | it impl|icitly d|
|00003e20| 65 66 69 6e 65 73 20 61 | 63 63 65 73 73 6f 72 20 |efines a|ccessor |
|00003e30| 66 75 6e 63 74 69 6f 6e | 73 20 66 6f 72 20 74 68 |function|s for th|
|00003e40| 65 0a 73 74 72 75 63 74 | 75 72 65 2e 20 20 54 68 |e.struct|ure. Th|
|00003e50| 65 20 5c 63 6f 64 65 7b | 6c 6f 6f 70 2d 75 6e 74 |e \code{|loop-unt|
|00003e60| 69 6c 2d 65 78 69 74 7d | 20 6d 61 63 72 6f 20 74 |il-exit}| macro t|
|00003e70| 68 61 74 20 69 73 20 75 | 73 65 64 0a 61 73 20 61 |hat is u|sed.as a|
|00003e80| 6e 20 65 78 61 6d 70 6c | 65 20 6f 66 20 74 68 65 |n exampl|e of the|
|00003e90| 20 6c 6f 77 2d 6c 65 76 | 65 6c 20 6d 61 63 72 6f | low-lev|el macro|
|00003ea0| 20 73 79 73 74 65 6d 20 | 69 6e 20 74 68 65 20 52 | system |in the R|
|00003eb0| 65 76 69 73 65 64 24 5e | 34 24 0a 52 65 70 6f 72 |evised$^|4$.Repor|
|00003ec0| 74 20 69 73 20 61 6c 73 | 6f 20 61 20 6e 6f 6e 2d |t is als|o a non-|
|00003ed0| 68 79 67 69 65 6e 69 63 | 20 6d 61 63 72 6f 2e 20 |hygienic| macro. |
|00003ee0| 20 49 74 20 6d 61 79 20 | 75 73 65 66 75 6c 6c 79 | It may |usefully|
|00003ef0| 20 62 65 0a 63 6f 6d 70 | 61 72 65 64 20 77 69 74 | be.comp|ared wit|
|00003f00| 68 20 73 69 6d 69 6c 61 | 72 20 6d 61 63 72 6f 73 |h simila|r macros|
|00003f10| 20 69 6e 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e | in the |followin|
|00003f20| 67 20 61 72 74 69 63 6c | 65 73 2e 0a 0a 0a 49 6e |g articl|es....In|
|00003f30| 20 63 6f 6e 63 6c 75 73 | 69 6f 6e 2c 20 74 68 65 | conclus|ion, the|
|00003f40| 20 68 79 67 69 65 6e 69 | 63 20 6d 61 63 72 6f 20 | hygieni|c macro |
|00003f50| 73 79 73 74 65 6d 20 64 | 65 73 63 72 69 62 65 64 |system d|escribed|
|00003f60| 20 69 6e 20 74 68 65 0a | 52 65 76 69 73 65 64 24 | in the.|Revised$|
|00003f70| 5e 34 24 20 52 65 70 6f | 72 74 20 69 73 20 61 20 |^4$ Repo|rt is a |
|00003f80| 63 6f 6e 73 69 64 65 72 | 61 62 6c 65 20 61 64 76 |consider|able adv|
|00003f90| 61 6e 63 65 20 6f 76 65 | 72 20 70 72 65 76 69 6f |ance ove|r previo|
|00003fa0| 75 73 0a 6d 61 63 72 6f | 20 73 79 73 74 65 6d 73 |us.macro| systems|
|00003fb0| 2e 20 20 49 74 20 68 61 | 73 20 61 20 66 65 77 20 |. It ha|s a few |
|00003fc0| 62 75 67 73 20 79 65 74 | 2c 20 66 6f 72 20 77 68 |bugs yet|, for wh|
|00003fd0| 69 63 68 20 73 6f 6c 75 | 74 69 6f 6e 73 0a 63 61 |ich solu|tions.ca|
|00003fe0| 6e 20 65 61 73 69 6c 79 | 20 62 65 20 69 6d 61 67 |n easily| be imag|
|00003ff0| 69 6e 65 64 2e 20 20 45 | 76 65 6e 20 69 66 20 74 |ined. E|ven if t|
|00004000| 68 65 73 65 20 62 75 67 | 73 20 61 72 65 20 66 69 |hese bug|s are fi|
|00004010| 78 65 64 2c 0a 68 6f 77 | 65 76 65 72 2c 20 74 68 |xed,.how|ever, th|
|00004020| 65 72 65 20 77 69 6c 6c | 20 73 74 69 6c 6c 20 62 |ere will| still b|
|00004030| 65 20 6e 6f 6e 2d 68 79 | 67 69 65 6e 69 63 20 6d |e non-hy|gienic m|
|00004040| 61 63 72 6f 73 20 61 6e | 64 20 70 65 72 68 61 70 |acros an|d perhap|
|00004050| 73 0a 65 76 65 6e 20 61 | 20 66 65 77 20 68 79 67 |s.even a| few hyg|
|00004060| 69 65 6e 69 63 20 6d 61 | 63 72 6f 73 20 74 68 61 |ienic ma|cros tha|
|00004070| 74 20 63 61 6e 6e 6f 74 | 20 62 65 20 77 72 69 74 |t cannot| be writ|
|00004080| 74 65 6e 20 75 73 69 6e | 67 20 74 68 65 0a 68 79 |ten usin|g the.hy|
|00004090| 67 69 65 6e 69 63 20 6d | 61 63 72 6f 20 73 79 73 |gienic m|acro sys|
|000040a0| 74 65 6d 2e 20 20 54 68 | 61 74 20 69 73 20 77 68 |tem. Th|at is wh|
|000040b0| 79 20 74 68 65 20 52 65 | 76 69 73 65 64 24 5e 34 |y the Re|vised$^4|
|000040c0| 24 20 52 65 70 6f 72 74 | 0a 61 6c 73 6f 20 64 65 |$ Report|.also de|
|000040d0| 73 63 72 69 62 65 73 20 | 61 20 63 6f 6d 70 61 74 |scribes |a compat|
|000040e0| 69 62 6c 65 20 6c 6f 77 | 2d 6c 65 76 65 6c 20 6d |ible low|-level m|
|000040f0| 61 63 72 6f 20 73 79 73 | 74 65 6d 2e 0a 0a 0a 54 |acro sys|tem....T|
|00004100| 68 65 20 6c 6f 77 2d 6c | 65 76 65 6c 20 6d 61 63 |he low-l|evel mac|
|00004110| 72 6f 20 73 79 73 74 65 | 6d 20 64 65 73 63 72 69 |ro syste|m descri|
|00004120| 62 65 64 20 69 6e 20 74 | 68 65 20 52 65 76 69 73 |bed in t|he Revis|
|00004130| 65 64 24 5e 34 24 20 52 | 65 70 6f 72 74 0a 69 73 |ed$^4$ R|eport.is|
|00004140| 20 65 78 70 65 72 69 6d | 65 6e 74 61 6c 2c 20 61 | experim|ental, a|
|00004150| 6e 64 20 69 73 20 6c 69 | 6b 65 6c 79 20 74 6f 20 |nd is li|kely to |
|00004160| 65 76 6f 6c 76 65 20 63 | 6f 6e 73 69 64 65 72 61 |evolve c|onsidera|
|00004170| 62 6c 79 20 6f 72 20 62 | 65 0a 72 65 70 6c 61 63 |bly or b|e.replac|
|00004180| 65 64 20 61 6c 74 6f 67 | 65 74 68 65 72 2e 0a 54 |ed altog|ether..T|
|00004190| 77 6f 20 61 6c 74 65 72 | 6e 61 74 69 76 65 20 6c |wo alter|native l|
|000041a0| 6f 77 2d 6c 65 76 65 6c | 20 6d 61 63 72 6f 20 73 |ow-level| macro s|
|000041b0| 79 73 74 65 6d 73 20 61 | 72 65 20 64 65 73 63 72 |ystems a|re descr|
|000041c0| 69 62 65 64 20 69 6e 20 | 74 68 65 0a 66 6f 6c 6c |ibed in |the.foll|
|000041d0| 6f 77 69 6e 67 20 61 72 | 74 69 63 6c 65 73 2c 20 |owing ar|ticles, |
|000041e0| 61 6e 64 20 49 20 61 6d | 20 73 75 72 65 20 74 68 |and I am| sure th|
|000041f0| 61 74 20 65 76 65 6e 20 | 6d 6f 72 65 20 77 69 6c |at even |more wil|
|00004200| 6c 20 62 65 0a 64 65 73 | 69 67 6e 65 64 20 64 75 |l be.des|igned du|
|00004210| 72 69 6e 67 20 74 68 65 | 20 6e 65 78 74 20 66 65 |ring the| next fe|
|00004220| 77 20 79 65 61 72 73 2e | 0a 0a 0a 53 63 68 65 6d |w years.|...Schem|
|00004230| 65 27 73 20 68 79 67 69 | 65 6e 69 63 20 6d 61 63 |e's hygi|enic mac|
|00004240| 72 6f 20 73 79 73 74 65 | 6d 20 75 73 65 73 20 61 |ro syste|m uses a|
|00004250| 20 73 74 61 62 6c 65 20 | 74 65 63 68 6e 6f 6c 6f | stable |technolo|
|00004260| 67 79 2c 0a 61 6e 64 20 | 53 63 68 65 6d 65 20 70 |gy,.and |Scheme p|
|00004270| 72 6f 67 72 61 6d 6d 65 | 72 73 20 63 61 6e 20 75 |rogramme|rs can u|
|00004280| 73 65 20 69 74 20 74 6f | 20 64 65 66 69 6e 65 20 |se it to| define |
|00004290| 6d 6f 73 74 20 6d 61 63 | 72 6f 73 0a 69 6e 20 61 |most mac|ros.in a|
|000042a0| 20 70 6f 72 74 61 62 6c | 65 20 77 61 79 2e 20 20 | portabl|e way. |
|000042b0| 49 20 61 6d 20 73 75 72 | 65 20 74 68 61 74 20 74 |I am sur|e that t|
|000042c0| 68 65 20 68 79 67 69 65 | 6e 69 63 20 6d 61 63 72 |he hygie|nic macr|
|000042d0| 6f 20 73 79 73 74 65 6d | 0a 77 69 6c 6c 20 62 65 |o system|.will be|
|000042e0| 20 65 78 74 65 6e 64 65 | 64 2c 20 62 75 74 20 49 | extende|d, but I|
|000042f0| 20 64 6f 20 6e 6f 74 20 | 65 78 70 65 63 74 20 69 | do not |expect i|
|00004300| 74 20 74 6f 20 63 68 61 | 6e 67 65 20 76 65 72 79 |t to cha|nge very|
|00004310| 20 6d 75 63 68 2e 0a 54 | 68 65 20 68 79 67 69 65 | much..T|he hygie|
|00004320| 6e 69 63 20 6d 61 63 72 | 6f 20 73 79 73 74 65 6d |nic macr|o system|
|00004330| 20 73 68 6f 75 6c 64 20 | 63 65 72 74 61 69 6e 6c | should |certainl|
|00004340| 79 20 62 65 20 63 6f 6e | 73 69 64 65 72 65 64 20 |y be con|sidered |
|00004350| 66 6f 72 0a 69 6e 63 6c | 75 73 69 6f 6e 20 77 68 |for.incl|usion wh|
|00004360| 65 6e 20 74 68 65 20 49 | 45 45 45 20 73 74 61 6e |en the I|EEE stan|
|00004370| 64 61 72 64 20 66 6f 72 | 20 53 63 68 65 6d 65 20 |dard for| Scheme |
|00004380| 5b 5c 49 45 45 45 53 63 | 68 65 6d 65 5d 0a 69 73 |[\IEEESc|heme].is|
|00004390| 20 6e 65 78 74 20 72 65 | 76 69 73 65 64 2e 0a 0a | next re|vised...|
|000043a0| 0a 54 68 65 20 6c 6f 77 | 2d 6c 65 76 65 6c 20 6d |.The low|-level m|
|000043b0| 61 63 72 6f 20 66 61 63 | 69 6c 69 74 69 65 73 20 |acro fac|ilities |
|000043c0| 70 72 6f 76 69 64 65 20 | 61 6e 20 65 73 63 61 70 |provide |an escap|
|000043d0| 65 20 66 6f 72 20 74 68 | 6f 73 65 0a 66 65 77 20 |e for th|ose.few |
|000043e0| 6d 61 63 72 6f 73 20 74 | 68 61 74 20 63 61 6e 6e |macros t|hat cann|
|000043f0| 6f 74 20 62 65 20 77 72 | 69 74 74 65 6e 20 75 73 |ot be wr|itten us|
|00004400| 69 6e 67 20 74 68 65 20 | 68 79 67 69 65 6e 69 63 |ing the |hygienic|
|00004410| 20 6d 61 63 72 6f 0a 73 | 79 73 74 65 6d 2c 20 62 | macro.s|ystem, b|
|00004420| 75 74 20 6d 61 63 72 6f | 73 20 77 72 69 74 74 65 |ut macro|s writte|
|00004430| 6e 20 75 73 69 6e 67 20 | 74 68 65 20 6c 6f 77 2d |n using |the low-|
|00004440| 6c 65 76 65 6c 20 66 61 | 63 69 6c 69 74 69 65 73 |level fa|cilities|
|00004450| 0a 77 69 6c 6c 20 6e 6f | 74 20 62 65 20 70 6f 72 |.will no|t be por|
|00004460| 74 61 62 6c 65 20 75 6e | 74 69 6c 20 74 68 65 20 |table un|til the |
|00004470| 53 63 68 65 6d 65 20 63 | 6f 6d 6d 75 6e 69 74 79 |Scheme c|ommunity|
|00004480| 20 68 61 73 20 67 61 69 | 6e 65 64 0a 65 6e 6f 75 | has gai|ned.enou|
|00004490| 67 68 20 65 78 70 65 72 | 69 65 6e 63 65 20 77 69 |gh exper|ience wi|
|000044a0| 74 68 20 74 68 65 73 65 | 20 6c 6f 77 2d 6c 65 76 |th these| low-lev|
|000044b0| 65 6c 20 6d 61 63 72 6f | 20 73 79 73 74 65 6d 73 |el macro| systems|
|000044c0| 20 74 6f 0a 64 65 73 69 | 67 6e 20 61 6e 64 20 61 | to.desi|gn and a|
|000044d0| 64 6f 70 74 20 6f 6e 65 | 20 6c 6f 77 2d 6c 65 76 |dopt one| low-lev|
|000044e0| 65 6c 20 73 79 73 74 65 | 6d 20 61 73 20 61 6e 20 |el syste|m as an |
|000044f0| 69 6e 66 6f 72 6d 61 6c | 20 73 74 61 6e 64 61 72 |informal| standar|
|00004500| 64 2e 0a 0a 0a 5c 62 65 | 67 69 6e 7b 74 68 65 62 |d....\be|gin{theb|
|00004510| 69 62 6c 69 6f 67 72 61 | 70 68 79 7d 7b 39 39 7d |ibliogra|phy}{99}|
|00004520| 0a 0a 0a 5c 62 69 62 69 | 74 65 6d 7b 72 72 72 73 |...\bibi|tem{rrrs|
|00004530| 7d 0a 57 69 6c 6c 69 61 | 6d 20 43 6c 69 6e 67 65 |}.Willia|m Clinge|
|00004540| 72 20 61 6e 64 20 4a 6f | 6e 61 74 68 61 6e 20 52 |r and Jo|nathan R|
|00004550| 65 65 73 20 5b 65 64 69 | 74 6f 72 73 5d 2e 0a 52 |ees [edi|tors]..R|
|00004560| 65 76 69 73 65 64 24 5e | 34 24 20 52 65 70 6f 72 |evised$^|4$ Repor|
|00004570| 74 20 6f 6e 20 74 68 65 | 20 41 6c 67 6f 72 69 74 |t on the| Algorit|
|00004580| 68 6d 69 63 20 4c 61 6e | 67 75 61 67 65 20 53 63 |hmic Lan|guage Sc|
|00004590| 68 65 6d 65 2e 0a 54 6f | 20 61 70 70 65 61 72 20 |heme..To| appear |
|000045a0| 69 6e 20 4c 69 73 70 20 | 50 6f 69 6e 74 65 72 73 |in Lisp |Pointers|
|000045b0| 2e 0a 0a 0a 5c 62 69 62 | 69 74 65 6d 7b 6d 61 63 |....\bib|item{mac|
|000045c0| 72 6f 73 74 68 61 74 77 | 6f 72 6b 7d 0a 57 69 6c |rosthatw|ork}.Wil|
|000045d0| 6c 69 61 6d 20 43 6c 69 | 6e 67 65 72 20 61 6e 64 |liam Cli|nger and|
|000045e0| 20 4a 6f 6e 61 74 68 61 | 6e 20 52 65 65 73 2e 0a | Jonatha|n Rees..|
|000045f0| 4d 61 63 72 6f 73 20 74 | 68 61 74 20 77 6f 72 6b |Macros t|hat work|
|00004600| 2e 0a 49 6e 20 7b 5c 65 | 6d 20 50 72 6f 63 65 65 |..In {\e|m Procee|
|00004610| 64 69 6e 67 73 20 6f 66 | 20 74 68 65 20 31 39 39 |dings of| the 199|
|00004620| 31 20 41 43 4d 20 43 6f | 6e 66 65 72 65 6e 63 65 |1 ACM Co|nference|
|00004630| 20 6f 6e 20 50 72 69 6e | 63 69 70 6c 65 73 20 6f | on Prin|ciples o|
|00004640| 66 0a 20 20 50 72 6f 67 | 72 61 6d 6d 69 6e 67 20 |f. Prog|ramming |
|00004650| 4c 61 6e 67 75 61 67 65 | 73 7d 2c 20 70 61 67 65 |Language|s}, page|
|00004660| 73 7e 31 35 35 2d 2d 31 | 36 32 2e 0a 0a 0a 5c 62 |s~155--1|62....\b|
|00004670| 69 62 69 74 65 6d 7b 49 | 45 45 45 53 63 68 65 6d |ibitem{I|EEESchem|
|00004680| 65 7d 0a 7b 5c 65 6d 20 | 49 45 45 45 20 53 74 61 |e}.{\em |IEEE Sta|
|00004690| 6e 64 61 72 64 20 31 31 | 37 38 2d 31 39 39 30 2e |ndard 11|78-1990.|
|000046a0| 20 20 49 45 45 45 20 53 | 74 61 6e 64 61 72 64 20 | IEEE S|tandard |
|000046b0| 66 6f 72 20 74 68 65 20 | 53 63 68 65 6d 65 0a 20 |for the |Scheme. |
|000046c0| 20 50 72 6f 67 72 61 6d | 6d 69 6e 67 20 4c 61 6e | Program|ming Lan|
|000046d0| 67 75 61 67 65 2e 7d 20 | 20 49 45 45 45 2c 20 4e |guage.} | IEEE, N|
|000046e0| 65 77 20 59 6f 72 6b 2c | 20 31 39 39 31 2e 0a 0a |ew York,| 1991...|
|000046f0| 0a 5c 62 69 62 69 74 65 | 6d 7b 6b 6f 68 6c 62 65 |.\bibite|m{kohlbe|
|00004700| 63 6b 65 72 7d 0a 45 75 | 67 65 6e 65 20 45 64 6d |cker}.Eu|gene Edm|
|00004710| 75 6e 64 20 4b 6f 68 6c | 62 65 63 6b 65 72 7e 4a |und Kohl|becker~J|
|00004720| 72 2e 0a 7b 5c 65 6d 20 | 53 79 6e 74 61 63 74 69 |r..{\em |Syntacti|
|00004730| 63 20 45 78 74 65 6e 73 | 69 6f 6e 73 20 69 6e 20 |c Extens|ions in |
|00004740| 74 68 65 20 50 72 6f 67 | 72 61 6d 6d 69 6e 67 20 |the Prog|ramming |
|00004750| 4c 61 6e 67 75 61 67 65 | 20 4c 69 73 70 2e 7d 0a |Language| Lisp.}.|
|00004760| 50 68 44 20 74 68 65 73 | 69 73 2c 20 49 6e 64 69 |PhD thes|is, Indi|
|00004770| 61 6e 61 20 55 6e 69 76 | 65 72 73 69 74 79 2c 20 |ana Univ|ersity, |
|00004780| 41 75 67 75 73 74 20 31 | 39 38 36 2e 0a 0a 0a 5c |August 1|986....\|
|00004790| 62 69 62 69 74 65 6d 7b | 43 4c 74 4c 32 7d 0a 47 |bibitem{|CLtL2}.G|
|000047a0| 75 79 20 4c 65 77 69 73 | 20 53 74 65 65 6c 65 20 |uy Lewis| Steele |
|000047b0| 4a 72 2e 0a 7b 5c 65 6d | 20 43 6f 6d 6d 6f 6e 20 |Jr..{\em| Common |
|000047c0| 4c 69 73 70 3a 20 54 68 | 65 20 4c 61 6e 67 75 61 |Lisp: Th|e Langua|
|000047d0| 67 65 2e 20 20 53 65 63 | 6f 6e 64 20 45 64 69 74 |ge. Sec|ond Edit|
|000047e0| 69 6f 6e 2e 7d 0a 44 69 | 67 69 74 61 6c 20 45 71 |ion.}.Di|gital Eq|
|000047f0| 75 69 70 6d 65 6e 74 20 | 43 6f 72 70 6f 72 61 74 |uipment |Corporat|
|00004800| 69 6f 6e 2c 20 31 39 39 | 30 2e 0a 0a 0a 5c 65 6e |ion, 199|0....\en|
|00004810| 64 7b 74 68 65 62 69 62 | 6c 69 6f 67 72 61 70 68 |d{thebib|liograph|
|00004820| 79 7d 0a 0a 0a 0a 0a 5c | 65 6e 64 7b 64 6f 63 75 |y}.....\|end{docu|
|00004830| 6d 65 6e 74 7d 0a | |ment}. | |
+--------+-------------------------+-------------------------+--------+--------+