home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / scheme / schmrprt / r4rs.lha / derive.tex < prev    next >
LaTeX Document  |  1991-11-08  |  6.3 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
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 73 65 63 74 69 6f 6e | 7b 44 65 72 69 76 65 64 |\section|{Derived|
|00000010| 20 65 78 70 72 65 73 73 | 69 6f 6e 20 74 79 70 65 | express|ion type|
|00000020| 73 7d 0a 5c 6c 61 62 65 | 6c 7b 64 65 72 69 76 65 |s}.\labe|l{derive|
|00000030| 64 73 65 63 74 69 6f 6e | 7d 0a 0a 54 68 69 73 20 |dsection|}..This |
|00000040| 73 65 63 74 69 6f 6e 20 | 67 69 76 65 73 20 72 65 |section |gives re|
|00000050| 77 72 69 74 65 20 72 75 | 6c 65 73 20 66 6f 72 20 |write ru|les for |
|00000060| 74 68 65 20 64 65 72 69 | 76 65 64 20 65 78 70 72 |the deri|ved expr|
|00000070| 65 73 73 69 6f 6e 20 74 | 79 70 65 73 2e 20 20 42 |ession t|ypes. B|
|00000080| 79 0a 74 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |y.the ap|plicatio|
|00000090| 6e 20 6f 66 20 74 68 65 | 73 65 20 72 75 6c 65 73 |n of the|se rules|
|000000a0| 2c 20 61 6e 79 20 65 78 | 70 72 65 73 73 69 6f 6e |, any ex|pression|
|000000b0| 20 63 61 6e 20 62 65 20 | 72 65 64 75 63 65 64 20 | can be |reduced |
|000000c0| 74 6f 20 61 0a 73 65 6d | 61 6e 74 69 63 61 6c 6c |to a.sem|anticall|
|000000d0| 79 20 65 71 75 69 76 61 | 6c 65 6e 74 20 65 78 70 |y equiva|lent exp|
|000000e0| 72 65 73 73 69 6f 6e 20 | 69 6e 20 77 68 69 63 68 |ression |in which|
|000000f0| 20 6f 6e 6c 79 20 74 68 | 65 20 70 72 69 6d 69 74 | only th|e primit|
|00000100| 69 76 65 0a 65 78 70 72 | 65 73 73 69 6f 6e 20 74 |ive.expr|ession t|
|00000110| 79 70 65 73 20 28 6c 69 | 74 65 72 61 6c 2c 20 76 |ypes (li|teral, v|
|00000120| 61 72 69 61 62 6c 65 2c | 20 63 61 6c 6c 2c 20 5c |ariable,| call, \|
|00000130| 69 64 65 7b 6c 61 6d 62 | 64 61 7d 2c 20 5c 69 64 |ide{lamb|da}, \id|
|00000140| 65 7b 69 66 7d 2c 0a 5c | 69 64 65 7b 73 65 74 21 |e{if},.\|ide{set!|
|00000150| 7d 29 20 6f 63 63 75 72 | 2e 0a 0a 25 20 5c 74 6f |}) occur|...% \to|
|00000160| 64 6f 7b 45 78 70 72 65 | 73 73 69 6f 6e 73 20 73 |do{Expre|ssions s|
|00000170| 75 63 68 20 61 73 20 7b | 5c 74 74 20 28 63 6f 6e |uch as {|\tt (con|
|00000180| 64 29 7d 20 61 72 65 6e | 27 74 20 6c 65 67 61 6c |d)} aren|'t legal|
|00000190| 2c 20 62 75 74 20 74 68 | 65 79 20 6d 61 6b 65 20 |, but th|ey make |
|000001a0| 74 68 65 0a 25 20 72 65 | 77 72 69 74 65 20 72 75 |the.% re|write ru|
|000001b0| 6c 65 73 20 77 6f 72 6b | 2e 7d 0a 0a 5c 6e 65 77 |les work|.}..\new|
|000001c0| 63 6f 6d 6d 61 6e 64 7b | 5c 69 65 74 7d 7b 5c 68 |command{|\iet}{\h|
|000001d0| 62 6f 78 20 74 6f 20 32 | 65 6d 7b 5c 68 66 69 6c |box to 2|em{\hfil|
|000001e0| 20 24 5c 65 71 75 69 76 | 24 7d 7d 20 20 25 20 69 | $\equiv|$}} % i|
|000001f0| 73 20 65 71 75 69 76 61 | 6c 65 6e 74 20 74 6f 0a |s equiva|lent to.|
|00000200| 0a 5c 62 65 67 69 6e 7b | 73 63 68 65 6d 65 6e 6f |.\begin{|schemeno|
|00000210| 69 6e 64 65 6e 74 7d 0a | 28 63 6f 6e 64 20 28 5c |indent}.|(cond (\|
|00000220| 68 79 70 65 72 7b 74 65 | 73 74 7d 20 5c 68 79 70 |hyper{te|st} \hyp|
|00000230| 65 72 7b 73 65 71 75 65 | 6e 63 65 7d 29 0a 20 20 |er{seque|nce}). |
|00000240| 20 20 20 20 5c 68 79 70 | 65 72 69 69 7b 63 6c 61 | \hyp|erii{cla|
|00000250| 75 73 65 7d 20 5c 64 6f | 74 73 66 6f 6f 29 0a 5c |use} \do|tsfoo).\|
|00000260| 69 65 74 20 20 28 69 66 | 20 5c 68 79 70 65 72 7b |iet (if| \hyper{|
|00000270| 74 65 73 74 7d 0a 20 20 | 20 20 20 20 20 20 20 20 |test}. | |
|00000280| 28 62 65 67 69 6e 20 5c | 68 79 70 65 72 7b 73 65 |(begin \|hyper{se|
|00000290| 71 75 65 6e 63 65 7d 29 | 0a 20 20 20 20 20 20 20 |quence})|. |
|000002a0| 20 20 20 28 63 6f 6e 64 | 20 5c 68 79 70 65 72 69 | (cond| \hyperi|
|000002b0| 69 7b 63 6c 61 75 73 65 | 7d 20 5c 64 6f 74 73 66 |i{clause|} \dotsf|
|000002c0| 6f 6f 29 29 0a 0a 28 63 | 6f 6e 64 20 28 5c 68 79 |oo))..(c|ond (\hy|
|000002d0| 70 65 72 7b 74 65 73 74 | 7d 29 0a 20 20 20 20 20 |per{test|}). |
|000002e0| 20 5c 68 79 70 65 72 69 | 69 7b 63 6c 61 75 73 65 | \hyperi|i{clause|
|000002f0| 7d 20 5c 64 6f 74 73 66 | 6f 6f 29 0a 5c 69 65 74 |} \dotsf|oo).\iet|
|00000300| 20 20 28 6f 72 20 5c 68 | 79 70 65 72 7b 74 65 73 | (or \h|yper{tes|
|00000310| 74 7d 20 28 63 6f 6e 64 | 20 5c 68 79 70 65 72 69 |t} (cond| \hyperi|
|00000320| 69 7b 63 6c 61 75 73 65 | 7d 20 5c 64 6f 74 73 66 |i{clause|} \dotsf|
|00000330| 6f 6f 29 29 0a 0a 28 63 | 6f 6e 64 20 28 5c 68 79 |oo))..(c|ond (\hy|
|00000340| 70 65 72 7b 74 65 73 74 | 7d 20 3d 3e 20 5c 68 79 |per{test|} => \hy|
|00000350| 70 65 72 7b 72 65 63 69 | 70 69 65 6e 74 7d 29 0a |per{reci|pient}).|
|00000360| 20 20 20 20 20 20 5c 68 | 79 70 65 72 69 69 7b 63 | \h|yperii{c|
|00000370| 6c 61 75 73 65 7d 20 5c | 64 6f 74 73 66 6f 6f 29 |lause} \|dotsfoo)|
|00000380| 0a 5c 69 65 74 20 20 28 | 6c 65 74 20 28 28 74 65 |.\iet (|let ((te|
|00000390| 73 74 2d 72 65 73 75 6c | 74 20 5c 68 79 70 65 72 |st-resul|t \hyper|
|000003a0| 7b 74 65 73 74 7d 29 0a | 20 20 20 20 20 20 20 20 |{test}).| |
|000003b0| 20 20 20 20 28 74 68 75 | 6e 6b 32 20 28 6c 61 6d | (thu|nk2 (lam|
|000003c0| 62 64 61 20 28 29 20 5c | 68 79 70 65 72 7b 72 65 |bda () \|hyper{re|
|000003d0| 63 69 70 69 65 6e 74 7d | 29 29 0a 20 20 20 20 20 |cipient}|)). |
|000003e0| 20 20 20 20 20 20 20 28 | 74 68 75 6e 6b 33 20 28 | (|thunk3 (|
|000003f0| 6c 61 6d 62 64 61 20 28 | 29 20 28 63 6f 6e 64 20 |lambda (|) (cond |
|00000400| 5c 68 79 70 65 72 69 69 | 7b 63 6c 61 75 73 65 7d |\hyperii|{clause}|
|00000410| 20 5c 64 6f 74 73 66 6f | 6f 29 29 29 29 0a 20 20 | \dotsfo|o)))). |
|00000420| 20 20 20 20 20 20 28 69 | 66 20 74 65 73 74 2d 72 | (i|f test-r|
|00000430| 65 73 75 6c 74 0a 20 20 | 20 20 20 20 20 20 20 20 |esult. | |
|00000440| 20 20 28 28 74 68 75 6e | 6b 32 29 20 74 65 73 74 | ((thun|k2) test|
|00000450| 2d 72 65 73 75 6c 74 29 | 0a 20 20 20 20 20 20 20 |-result)|. |
|00000460| 20 20 20 20 20 28 74 68 | 75 6e 6b 33 29 29 29 0a | (th|unk3))).|
|00000470| 0a 28 63 6f 6e 64 20 28 | 65 6c 73 65 20 5c 68 79 |.(cond (|else \hy|
|00000480| 70 65 72 7b 73 65 71 75 | 65 6e 63 65 7d 29 29 0a |per{sequ|ence})).|
|00000490| 5c 69 65 74 20 20 28 62 | 65 67 69 6e 20 5c 68 79 |\iet (b|egin \hy|
|000004a0| 70 65 72 7b 73 65 71 75 | 65 6e 63 65 7d 29 0a 0a |per{sequ|ence})..|
|000004b0| 28 63 6f 6e 64 29 0a 5c | 69 65 74 20 20 5c 68 79 |(cond).\|iet \hy|
|000004c0| 70 65 72 7b 73 6f 6d 65 | 20 65 78 70 72 65 73 73 |per{some| express|
|000004d0| 69 6f 6e 20 72 65 74 75 | 72 6e 69 6e 67 20 61 6e |ion retu|rning an|
|000004e0| 20 75 6e 73 70 65 63 69 | 66 69 65 64 20 76 61 6c | unspeci|fied val|
|000004f0| 75 65 7d 0a 0a 28 63 61 | 73 65 20 5c 68 79 70 65 |ue}..(ca|se \hype|
|00000500| 72 7b 6b 65 79 7d 20 0a | 20 20 28 28 64 31 20 5c |r{key} .| ((d1 \|
|00000510| 64 6f 74 73 66 6f 6f 29 | 20 5c 68 79 70 65 72 7b |dotsfoo)| \hyper{|
|00000520| 73 65 71 75 65 6e 63 65 | 7d 29 0a 20 20 5c 64 6f |sequence|}). \do|
|00000530| 74 73 66 6f 6f 29 0a 5c | 69 65 74 20 20 28 6c 65 |tsfoo).\|iet (le|
|00000540| 74 20 28 28 6b 65 79 20 | 5c 68 79 70 65 72 7b 6b |t ((key |\hyper{k|
|00000550| 65 79 7d 29 0a 20 20 20 | 20 20 20 20 20 20 20 20 |ey}). | |
|00000560| 20 28 74 68 75 6e 6b 31 | 20 28 6c 61 6d 62 64 61 | (thunk1| (lambda|
|00000570| 20 28 29 20 5c 68 79 70 | 65 72 7b 73 65 71 75 65 | () \hyp|er{seque|
|00000580| 6e 63 65 7d 29 29 0a 20 | 20 20 20 20 20 20 20 20 |nce})). | |
|00000590| 20 20 20 5c 64 6f 74 73 | 66 6f 6f 29 0a 20 20 20 | \dots|foo). |
|000005a0| 20 20 20 20 20 28 63 6f | 6e 64 20 28 28 5c 68 79 | (co|nd ((\hy|
|000005b0| 70 65 72 7b 6d 65 6d 76 | 7d 20 6b 65 79 20 27 28 |per{memv|} key '(|
|000005c0| 64 31 20 5c 64 6f 74 73 | 66 6f 6f 29 29 20 28 74 |d1 \dots|foo)) (t|
|000005d0| 68 75 6e 6b 31 29 29 0a | 20 20 20 20 20 20 20 20 |hunk1)).| |
|000005e0| 20 20 20 20 20 20 20 5c | 64 6f 74 73 66 6f 6f 29 | \|dotsfoo)|
|000005f0| 29 0a 0a 28 63 61 73 65 | 20 5c 68 79 70 65 72 7b |)..(case| \hyper{|
|00000600| 6b 65 79 7d 20 0a 20 20 | 28 28 64 31 20 5c 64 6f |key} . |((d1 \do|
|00000610| 74 73 66 6f 6f 29 20 5c | 68 79 70 65 72 7b 73 65 |tsfoo) \|hyper{se|
|00000620| 71 75 65 6e 63 65 7d 29 | 0a 20 20 5c 64 6f 74 73 |quence})|. \dots|
|00000630| 66 6f 6f 0a 20 20 28 65 | 6c 73 65 20 66 31 20 66 |foo. (e|lse f1 f|
|00000640| 32 20 5c 64 6f 74 73 66 | 6f 6f 29 29 0a 5c 69 65 |2 \dotsf|oo)).\ie|
|00000650| 74 20 20 28 6c 65 74 20 | 28 28 6b 65 79 20 5c 68 |t (let |((key \h|
|00000660| 79 70 65 72 7b 6b 65 79 | 7d 29 0a 20 20 20 20 20 |yper{key|}). |
|00000670| 20 20 20 20 20 20 20 28 | 74 68 75 6e 6b 31 20 28 | (|thunk1 (|
|00000680| 6c 61 6d 62 64 61 20 28 | 29 20 5c 68 79 70 65 72 |lambda (|) \hyper|
|00000690| 7b 73 65 71 75 65 6e 63 | 65 7d 29 29 0a 20 20 20 |{sequenc|e})). |
|000006a0| 20 20 20 20 20 20 20 20 | 20 5c 64 6f 74 73 66 6f | | \dotsfo|
|000006b0| 6f 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 28 65 |o. | (e|
|000006c0| 6c 73 65 74 68 75 6e 6b | 20 28 6c 61 6d 62 64 61 |lsethunk| (lambda|
|000006d0| 20 28 29 20 66 31 20 66 | 32 20 5c 64 6f 74 73 66 | () f1 f|2 \dotsf|
|000006e0| 6f 6f 29 29 29 0a 20 20 | 20 20 20 20 20 20 28 63 |oo))). | (c|
|000006f0| 6f 6e 64 20 28 28 5c 68 | 79 70 65 72 7b 6d 65 6d |ond ((\h|yper{mem|
|00000700| 76 7d 20 6b 65 79 20 27 | 28 64 31 20 5c 64 6f 74 |v} key '|(d1 \dot|
|00000710| 73 66 6f 6f 29 29 20 28 | 74 68 75 6e 6b 31 29 29 |sfoo)) (|thunk1))|
|00000720| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00000730| 5c 64 6f 74 73 66 6f 6f | 0a 20 20 20 20 20 20 20 |\dotsfoo|. |
|00000740| 20 20 20 20 20 20 20 28 | 65 6c 73 65 20 28 65 6c | (|else (el|
|00000750| 73 65 74 68 75 6e 6b 29 | 29 29 29 25 0a 5c 65 6e |sethunk)|)))%.\en|
|00000760| 64 7b 73 63 68 65 6d 65 | 6e 6f 69 6e 64 65 6e 74 |d{scheme|noindent|
|00000770| 7d 0a 77 68 65 72 65 20 | 5c 68 79 70 65 72 7b 6d |}.where |\hyper{m|
|00000780| 65 6d 76 7d 20 69 73 20 | 61 6e 20 65 78 70 72 65 |emv} is |an expre|
|00000790| 73 73 69 6f 6e 20 65 76 | 61 6c 75 61 74 69 6e 67 |ssion ev|aluating|
|000007a0| 20 74 6f 20 74 68 65 20 | 5c 69 64 65 7b 6d 65 6d | to the |\ide{mem|
|000007b0| 76 7d 20 70 72 6f 63 65 | 64 75 72 65 2e 0a 0a 5c |v} proce|dure...\|
|000007c0| 62 65 67 69 6e 7b 73 63 | 68 65 6d 65 6e 6f 69 6e |begin{sc|hemenoin|
|000007d0| 64 65 6e 74 7d 0a 28 61 | 6e 64 29 20 20 20 20 20 |dent}.(a|nd) |
|000007e0| 20 20 20 20 5c 3d 5c 69 | 65 74 20 20 5c 73 63 68 | \=\i|et \sch|
|000007f0| 74 72 75 65 0a 28 61 6e | 64 20 5c 68 79 70 65 72 |true.(an|d \hyper|
|00000800| 7b 74 65 73 74 7d 29 5c | 3e 5c 69 65 74 20 20 5c |{test})\|>\iet \|
|00000810| 68 79 70 65 72 7b 74 65 | 73 74 7d 0a 28 61 6e 64 |hyper{te|st}.(and|
|00000820| 20 5c 68 79 70 65 72 69 | 7b 74 65 73 74 7d 20 5c | \hyperi|{test} \|
|00000830| 68 79 70 65 72 69 69 7b | 74 65 73 74 7d 20 5c 64 |hyperii{|test} \d|
|00000840| 6f 74 73 66 6f 6f 29 0a | 5c 69 65 74 20 20 28 6c |otsfoo).|\iet (l|
|00000850| 65 74 20 28 28 78 20 5c | 68 79 70 65 72 69 7b 74 |et ((x \|hyperi{t|
|00000860| 65 73 74 7d 29 0a 20 20 | 20 20 20 20 20 20 20 20 |est}). | |
|00000870| 20 20 28 74 68 75 6e 6b | 20 28 6c 61 6d 62 64 61 | (thunk| (lambda|
|00000880| 20 28 29 20 28 61 6e 64 | 20 5c 68 79 70 65 72 69 | () (and| \hyperi|
|00000890| 69 7b 74 65 73 74 7d 20 | 5c 64 6f 74 73 66 6f 6f |i{test} |\dotsfoo|
|000008a0| 29 29 29 29 0a 20 20 20 | 20 20 20 20 20 28 69 66 |)))). | (if|
|000008b0| 20 78 20 28 74 68 75 6e | 6b 29 20 78 29 29 0a 0a | x (thun|k) x))..|
|000008c0| 28 6f 72 29 20 20 20 20 | 20 20 20 20 20 20 5c 3e |(or) | \>|
|000008d0| 5c 69 65 74 20 20 5c 73 | 63 68 66 61 6c 73 65 0a |\iet \s|chfalse.|
|000008e0| 28 6f 72 20 5c 68 79 70 | 65 72 7b 74 65 73 74 7d |(or \hyp|er{test}|
|000008f0| 29 5c 3e 5c 69 65 74 20 | 20 5c 68 79 70 65 72 7b |)\>\iet | \hyper{|
|00000900| 74 65 73 74 7d 0a 28 6f | 72 20 5c 68 79 70 65 72 |test}.(o|r \hyper|
|00000910| 69 7b 74 65 73 74 7d 20 | 5c 68 79 70 65 72 69 69 |i{test} |\hyperii|
|00000920| 7b 74 65 73 74 7d 20 5c | 64 6f 74 73 66 6f 6f 29 |{test} \|dotsfoo)|
|00000930| 0a 5c 69 65 74 20 20 28 | 6c 65 74 20 28 28 78 20 |.\iet (|let ((x |
|00000940| 5c 68 79 70 65 72 69 7b | 74 65 73 74 7d 29 0a 20 |\hyperi{|test}). |
|00000950| 20 20 20 20 20 20 20 20 | 20 20 20 28 74 68 75 6e | | (thun|
|00000960| 6b 20 28 6c 61 6d 62 64 | 61 20 28 29 20 28 6f 72 |k (lambd|a () (or|
|00000970| 20 5c 68 79 70 65 72 69 | 69 7b 74 65 73 74 7d 20 | \hyperi|i{test} |
|00000980| 5c 64 6f 74 73 66 6f 6f | 29 29 29 29 0a 20 20 20 |\dotsfoo|)))). |
|00000990| 20 20 20 20 20 28 69 66 | 20 78 20 78 20 28 74 68 | (if| x x (th|
|000009a0| 75 6e 6b 29 29 29 0a 0a | 28 6c 65 74 20 28 28 5c |unk)))..|(let ((\|
|000009b0| 68 79 70 65 72 69 7b 76 | 61 72 69 61 62 6c 65 7d |hyperi{v|ariable}|
|000009c0| 20 5c 68 79 70 65 72 69 | 7b 69 6e 69 74 7d 29 20 | \hyperi|{init}) |
|000009d0| 5c 64 6f 74 73 66 6f 6f | 29 0a 20 20 5c 68 79 70 |\dotsfoo|). \hyp|
|000009e0| 65 72 7b 62 6f 64 79 7d | 29 0a 5c 69 65 74 20 20 |er{body}|).\iet |
|000009f0| 28 28 6c 61 6d 62 64 61 | 20 28 5c 68 79 70 65 72 |((lambda| (\hyper|
|00000a00| 69 7b 76 61 72 69 61 62 | 6c 65 7d 20 5c 64 6f 74 |i{variab|le} \dot|
|00000a10| 73 66 6f 6f 29 20 5c 68 | 79 70 65 72 7b 62 6f 64 |sfoo) \h|yper{bod|
|00000a20| 79 7d 29 20 5c 68 79 70 | 65 72 69 7b 69 6e 69 74 |y}) \hyp|eri{init|
|00000a30| 7d 20 5c 64 6f 74 73 66 | 6f 6f 29 0a 0a 28 6c 65 |} \dotsf|oo)..(le|
|00000a40| 74 2a 20 28 29 20 5c 68 | 79 70 65 72 7b 62 6f 64 |t* () \h|yper{bod|
|00000a50| 79 7d 29 0a 5c 69 65 74 | 20 20 28 28 6c 61 6d 62 |y}).\iet| ((lamb|
|00000a60| 64 61 20 28 29 20 5c 68 | 79 70 65 72 7b 62 6f 64 |da () \h|yper{bod|
|00000a70| 79 7d 29 29 0a 28 6c 65 | 74 2a 20 28 28 5c 68 79 |y})).(le|t* ((\hy|
|00000a80| 70 65 72 69 7b 76 61 72 | 69 61 62 6c 65 7d 20 5c |peri{var|iable} \|
|00000a90| 68 79 70 65 72 69 7b 69 | 6e 69 74 7d 29 0a 20 20 |hyperi{i|nit}). |
|00000aa0| 20 20 20 20 20 28 5c 68 | 79 70 65 72 69 69 7b 76 | (\h|yperii{v|
|00000ab0| 61 72 69 61 62 6c 65 7d | 20 5c 68 79 70 65 72 69 |ariable}| \hyperi|
|00000ac0| 69 7b 69 6e 69 74 7d 29 | 0a 20 20 20 20 20 20 20 |i{init})|. |
|00000ad0| 5c 64 6f 74 73 66 6f 6f | 29 0a 20 20 5c 68 79 70 |\dotsfoo|). \hyp|
|00000ae0| 65 72 7b 62 6f 64 79 7d | 29 0a 5c 69 65 74 20 20 |er{body}|).\iet |
|00000af0| 28 6c 65 74 20 28 28 5c | 68 79 70 65 72 69 7b 76 |(let ((\|hyperi{v|
|00000b00| 61 72 69 61 62 6c 65 7d | 20 5c 68 79 70 65 72 69 |ariable}| \hyperi|
|00000b10| 7b 69 6e 69 74 7d 29 29 | 20 0a 20 20 20 20 20 20 |{init}))| . |
|00000b20| 20 20 28 6c 65 74 2a 20 | 28 28 5c 68 79 70 65 72 | (let* |((\hyper|
|00000b30| 69 69 7b 76 61 72 69 61 | 62 6c 65 7d 20 5c 68 79 |ii{varia|ble} \hy|
|00000b40| 70 65 72 69 69 7b 69 6e | 69 74 7d 29 0a 20 20 20 |perii{in|it}). |
|00000b50| 20 20 20 20 20 20 20 20 | 20 20 20 20 5c 64 6f 74 | | \dot|
|00000b60| 73 66 6f 6f 29 0a 20 20 | 20 20 20 20 20 20 20 20 |sfoo). | |
|00000b70| 5c 68 79 70 65 72 7b 62 | 6f 64 79 7d 29 29 0a 0a |\hyper{b|ody}))..|
|00000b80| 28 6c 65 74 72 65 63 20 | 28 28 5c 68 79 70 65 72 |(letrec |((\hyper|
|00000b90| 69 7b 76 61 72 69 61 62 | 6c 65 7d 20 5c 68 79 70 |i{variab|le} \hyp|
|00000ba0| 65 72 69 7b 69 6e 69 74 | 7d 29 0a 20 20 20 20 20 |eri{init|}). |
|00000bb0| 20 20 20 20 5c 64 6f 74 | 73 66 6f 6f 29 0a 20 20 | \dot|sfoo). |
|00000bc0| 5c 68 79 70 65 72 7b 62 | 6f 64 79 7d 29 0a 5c 69 |\hyper{b|ody}).\i|
|00000bd0| 65 74 20 20 28 6c 65 74 | 20 28 28 5c 68 79 70 65 |et (let| ((\hype|
|00000be0| 72 69 7b 76 61 72 69 61 | 62 6c 65 7d 20 5c 68 79 |ri{varia|ble} \hy|
|00000bf0| 70 65 72 7b 75 6e 64 65 | 66 69 6e 65 64 7d 29 0a |per{unde|fined}).|
|00000c00| 20 20 20 20 20 20 20 20 | 20 20 20 20 5c 64 6f 74 | | \dot|
|00000c10| 73 66 6f 6f 29 0a 20 20 | 20 20 20 20 20 20 20 28 |sfoo). | (|
|00000c20| 6c 65 74 20 28 28 5c 68 | 79 70 65 72 69 7b 74 65 |let ((\h|yperi{te|
|00000c30| 6d 70 7d 20 5c 68 79 70 | 65 72 69 7b 69 6e 69 74 |mp} \hyp|eri{init|
|00000c40| 7d 29 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |}). | |
|00000c50| 20 20 5c 64 6f 74 73 66 | 6f 6f 29 0a 20 20 20 20 | \dotsf|oo). |
|00000c60| 20 20 20 20 20 20 20 28 | 73 65 74 21 20 5c 68 79 | (|set! \hy|
|00000c70| 70 65 72 69 7b 76 61 72 | 69 61 62 6c 65 7d 20 5c |peri{var|iable} \|
|00000c80| 68 79 70 65 72 69 7b 74 | 65 6d 70 7d 29 0a 20 20 |hyperi{t|emp}). |
|00000c90| 20 20 20 20 20 20 20 20 | 20 5c 64 6f 74 73 66 6f | | \dotsfo|
|00000ca0| 6f 29 0a 20 20 20 20 20 | 20 20 20 20 5c 68 79 70 |o). | \hyp|
|00000cb0| 65 72 7b 62 6f 64 79 7d | 29 25 0a 5c 65 6e 64 7b |er{body}|)%.\end{|
|00000cc0| 73 63 68 65 6d 65 6e 6f | 69 6e 64 65 6e 74 7d 0a |schemeno|indent}.|
|00000cd0| 77 68 65 72 65 20 5c 68 | 79 70 65 72 69 7b 74 65 |where \h|yperi{te|
|00000ce0| 6d 70 7d 2c 20 5c 68 79 | 70 65 72 69 69 7b 74 65 |mp}, \hy|perii{te|
|00000cf0| 6d 70 7d 2c 20 5c 64 6f | 74 73 66 6f 6f 7b 7d 20 |mp}, \do|tsfoo{} |
|00000d00| 61 72 65 20 76 61 72 69 | 61 62 6c 65 73 2c 20 64 |are vari|ables, d|
|00000d10| 69 73 74 69 6e 63 74 0a | 66 72 6f 6d 20 5c 68 79 |istinct.|from \hy|
|00000d20| 70 65 72 69 7b 76 61 72 | 69 61 62 6c 65 7d 2c 20 |peri{var|iable}, |
|00000d30| 5c 64 6f 74 73 66 6f 6f | 7b 7d 2c 20 74 68 61 74 |\dotsfoo|{}, that|
|00000d40| 20 64 6f 20 6e 6f 74 20 | 66 72 65 65 20 6f 63 63 | do not |free occ|
|00000d50| 75 72 20 69 6e 20 74 68 | 65 0a 6f 72 69 67 69 6e |ur in th|e.origin|
|00000d60| 61 6c 20 5c 68 79 70 65 | 72 7b 69 6e 69 74 7d 20 |al \hype|r{init} |
|00000d70| 65 78 70 72 65 73 73 69 | 6f 6e 73 2c 20 61 6e 64 |expressi|ons, and|
|00000d80| 20 5c 68 79 70 65 72 7b | 75 6e 64 65 66 69 6e 65 | \hyper{|undefine|
|00000d90| 64 7d 20 69 73 20 61 6e | 20 65 78 70 72 65 73 73 |d} is an| express|
|00000da0| 69 6f 6e 0a 77 68 69 63 | 68 20 72 65 74 75 72 6e |ion.whic|h return|
|00000db0| 73 20 73 6f 6d 65 74 68 | 69 6e 67 20 74 68 61 74 |s someth|ing that|
|00000dc0| 20 77 68 65 6e 20 73 74 | 6f 72 65 64 20 69 6e 20 | when st|ored in |
|00000dd0| 61 20 6c 6f 63 61 74 69 | 6f 6e 20 6d 61 6b 65 73 |a locati|on makes|
|00000de0| 20 69 74 20 61 6e 0a 65 | 72 72 6f 72 20 74 6f 20 | it an.e|rror to |
|00000df0| 74 72 79 20 74 6f 20 6f | 62 74 61 69 6e 20 74 68 |try to o|btain th|
|00000e00| 65 20 76 61 6c 75 65 20 | 73 74 6f 72 65 64 20 69 |e value |stored i|
|00000e10| 6e 20 74 68 65 20 6c 6f | 63 61 74 69 6f 6e 2e 20 |n the lo|cation. |
|00000e20| 20 28 4e 6f 20 73 75 63 | 68 0a 65 78 70 72 65 73 | (No suc|h.expres|
|00000e30| 73 69 6f 6e 20 69 73 20 | 64 65 66 69 6e 65 64 2c |sion is |defined,|
|00000e40| 20 62 75 74 20 6f 6e 65 | 20 69 73 20 61 73 73 75 | but one| is assu|
|00000e50| 6d 65 64 20 74 6f 20 65 | 78 69 73 74 20 66 6f 72 |med to e|xist for|
|00000e60| 20 74 68 65 20 70 75 72 | 70 6f 73 65 73 20 6f 66 | the pur|poses of|
|00000e70| 20 74 68 69 73 0a 72 65 | 77 72 69 74 65 20 72 75 | this.re|write ru|
|00000e80| 6c 65 2e 29 20 20 54 68 | 65 20 73 65 63 6f 6e 64 |le.) Th|e second|
|00000e90| 20 5c 69 64 65 7b 6c 65 | 74 7d 20 65 78 70 72 65 | \ide{le|t} expre|
|00000ea0| 73 73 69 6f 6e 20 69 6e | 20 74 68 65 20 65 78 70 |ssion in| the exp|
|00000eb0| 61 6e 73 69 6f 6e 20 69 | 73 20 6e 6f 74 0a 73 74 |ansion i|s not.st|
|00000ec0| 72 69 63 74 6c 79 20 6e | 65 63 65 73 73 61 72 79 |rictly n|ecessary|
|00000ed0| 2c 20 62 75 74 20 69 74 | 20 73 65 72 76 65 73 20 |, but it| serves |
|00000ee0| 74 6f 20 70 72 65 73 65 | 72 76 65 20 74 68 65 20 |to prese|rve the |
|00000ef0| 70 72 6f 70 65 72 74 79 | 20 74 68 61 74 20 74 68 |property| that th|
|00000f00| 65 0a 5c 68 79 70 65 72 | 7b 69 6e 69 74 7d 20 65 |e.\hyper|{init} e|
|00000f10| 78 70 72 65 73 73 69 6f | 6e 73 20 61 72 65 20 65 |xpressio|ns are e|
|00000f20| 76 61 6c 75 61 74 65 64 | 20 69 6e 20 61 6e 20 61 |valuated| in an a|
|00000f30| 72 62 69 74 72 61 72 79 | 20 6f 72 64 65 72 2e 0a |rbitrary| order..|
|00000f40| 0a 0a 5c 62 65 67 69 6e | 7b 73 63 68 65 6d 65 6e |..\begin|{schemen|
|00000f50| 6f 69 6e 64 65 6e 74 7d | 0a 0a 28 62 65 67 69 6e |oindent}|..(begin|
|00000f60| 20 5c 68 79 70 65 72 7b | 73 65 71 75 65 6e 63 65 | \hyper{|sequence|
|00000f70| 7d 29 0a 5c 69 65 74 20 | 20 28 28 6c 61 6d 62 64 |}).\iet | ((lambd|
|00000f80| 61 20 28 29 20 5c 68 79 | 70 65 72 7b 73 65 71 75 |a () \hy|per{sequ|
|00000f90| 65 6e 63 65 7d 29 29 25 | 0a 5c 65 6e 64 7b 73 63 |ence}))%|.\end{sc|
|00000fa0| 68 65 6d 65 6e 6f 69 6e | 64 65 6e 74 7d 0a 54 68 |hemenoin|dent}.Th|
|00000fb0| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 61 6c 74 65 |e follow|ing alte|
|00000fc0| 72 6e 61 74 69 76 65 20 | 65 78 70 61 6e 73 69 6f |rnative |expansio|
|00000fd0| 6e 20 66 6f 72 20 5c 69 | 64 65 7b 62 65 67 69 6e |n for \i|de{begin|
|00000fe0| 7d 20 64 6f 65 73 20 6e | 6f 74 20 6d 61 6b 65 20 |} does n|ot make |
|00000ff0| 75 73 65 20 6f 66 0a 74 | 68 65 20 61 62 69 6c 69 |use of.t|he abili|
|00001000| 74 79 20 74 6f 20 77 72 | 69 74 65 20 6d 6f 72 65 |ty to wr|ite more|
|00001010| 20 74 68 61 6e 20 6f 6e | 65 20 65 78 70 72 65 73 | than on|e expres|
|00001020| 73 69 6f 6e 20 69 6e 20 | 74 68 65 20 62 6f 64 79 |sion in |the body|
|00001030| 20 6f 66 20 61 20 6c 61 | 6d 62 64 61 0a 65 78 70 | of a la|mbda.exp|
|00001040| 72 65 73 73 69 6f 6e 2e | 20 20 49 6e 20 61 6e 79 |ression.| In any|
|00001050| 20 63 61 73 65 2c 20 6e | 6f 74 65 20 74 68 61 74 | case, n|ote that|
|00001060| 20 74 68 65 73 65 20 72 | 75 6c 65 73 20 61 70 70 | these r|ules app|
|00001070| 6c 79 20 6f 6e 6c 79 20 | 69 66 0a 5c 68 79 70 65 |ly only |if.\hype|
|00001080| 72 7b 73 65 71 75 65 6e | 63 65 7d 20 63 6f 6e 74 |r{sequen|ce} cont|
|00001090| 61 69 6e 73 20 6e 6f 20 | 64 65 66 69 6e 69 74 69 |ains no |definiti|
|000010a0| 6f 6e 73 2e 0a 5c 62 65 | 67 69 6e 7b 73 63 68 65 |ons..\be|gin{sche|
|000010b0| 6d 65 6e 6f 69 6e 64 65 | 6e 74 7d 0a 28 62 65 67 |menoinde|nt}.(beg|
|000010c0| 69 6e 20 5c 68 79 70 65 | 72 7b 65 78 70 72 65 73 |in \hype|r{expres|
|000010d0| 73 69 6f 6e 7d 29 5c 69 | 65 74 20 20 5c 68 79 70 |sion})\i|et \hyp|
|000010e0| 65 72 7b 65 78 70 72 65 | 73 73 69 6f 6e 7d 0a 28 |er{expre|ssion}.(|
|000010f0| 62 65 67 69 6e 20 5c 68 | 79 70 65 72 7b 63 6f 6d |begin \h|yper{com|
|00001100| 6d 61 6e 64 7d 20 5c 68 | 79 70 65 72 7b 73 65 71 |mand} \h|yper{seq|
|00001110| 75 65 6e 63 65 7d 29 0a | 5c 69 65 74 20 20 28 28 |uence}).|\iet ((|
|00001120| 6c 61 6d 62 64 61 20 28 | 69 67 6e 6f 72 65 20 74 |lambda (|ignore t|
|00001130| 68 75 6e 6b 29 20 28 74 | 68 75 6e 6b 29 29 0a 20 |hunk) (t|hunk)). |
|00001140| 20 20 20 20 20 20 5c 68 | 79 70 65 72 7b 63 6f 6d | \h|yper{com|
|00001150| 6d 61 6e 64 7d 0a 20 20 | 20 20 20 20 20 28 6c 61 |mand}. | (la|
|00001160| 6d 62 64 61 20 28 29 20 | 28 62 65 67 69 6e 20 5c |mbda () |(begin \|
|00001170| 68 79 70 65 72 7b 73 65 | 71 75 65 6e 63 65 7d 29 |hyper{se|quence})|
|00001180| 29 29 25 0a 5c 65 6e 64 | 7b 73 63 68 65 6d 65 6e |))%.\end|{schemen|
|00001190| 6f 69 6e 64 65 6e 74 7d | 0a 0a 54 68 65 20 66 6f |oindent}|..The fo|
|000011a0| 6c 6c 6f 77 69 6e 67 20 | 65 78 70 61 6e 73 69 6f |llowing |expansio|
|000011b0| 6e 20 66 6f 72 20 5c 69 | 64 65 7b 64 6f 7d 20 69 |n for \i|de{do} i|
|000011c0| 73 20 73 69 6d 70 6c 69 | 66 69 65 64 20 62 79 20 |s simpli|fied by |
|000011d0| 74 68 65 20 61 73 73 75 | 6d 70 74 69 6f 6e 0a 74 |the assu|mption.t|
|000011e0| 68 61 74 20 6e 6f 20 5c | 68 79 70 65 72 7b 73 74 |hat no \|hyper{st|
|000011f0| 65 70 7d 20 69 73 20 6f | 6d 69 74 74 65 64 2e 20 |ep} is o|mitted. |
|00001200| 20 41 6e 79 20 5c 69 64 | 65 7b 64 6f 7d 20 65 78 | Any \id|e{do} ex|
|00001210| 70 72 65 73 73 69 6f 6e | 20 69 6e 20 77 68 69 63 |pression| in whic|
|00001220| 68 20 61 0a 5c 68 79 70 | 65 72 7b 73 74 65 70 7d |h a.\hyp|er{step}|
|00001230| 20 69 73 20 6f 6d 69 74 | 74 65 64 20 63 61 6e 20 | is omit|ted can |
|00001240| 62 65 20 72 65 70 6c 61 | 63 65 64 20 62 79 20 61 |be repla|ced by a|
|00001250| 6e 20 65 71 75 69 76 61 | 6c 65 6e 74 20 5c 69 64 |n equiva|lent \id|
|00001260| 65 7b 64 6f 7d 0a 65 78 | 70 72 65 73 73 69 6f 6e |e{do}.ex|pression|
|00001270| 20 69 6e 20 77 68 69 63 | 68 20 74 68 65 20 63 6f | in whic|h the co|
|00001280| 72 72 65 73 70 6f 6e 64 | 69 6e 67 20 5c 68 79 70 |rrespond|ing \hyp|
|00001290| 65 72 7b 76 61 72 69 61 | 62 6c 65 7d 20 61 70 70 |er{varia|ble} app|
|000012a0| 65 61 72 73 20 61 73 0a | 74 68 65 20 5c 68 79 70 |ears as.|the \hyp|
|000012b0| 65 72 7b 73 74 65 70 7d | 2e 20 0a 0a 5c 62 65 67 |er{step}|. ..\beg|
|000012c0| 69 6e 7b 73 63 68 65 6d | 65 6e 6f 69 6e 64 65 6e |in{schem|enoinden|
|000012d0| 74 7d 0a 28 64 6f 20 28 | 28 5c 68 79 70 65 72 69 |t}.(do (|(\hyperi|
|000012e0| 7b 76 61 72 69 61 62 6c | 65 7d 20 5c 68 79 70 65 |{variabl|e} \hype|
|000012f0| 72 69 7b 69 6e 69 74 7d | 20 5c 68 79 70 65 72 69 |ri{init}| \hyperi|
|00001300| 7b 73 74 65 70 7d 29 20 | 0a 20 20 20 20 20 5c 64 |{step}) |. \d|
|00001310| 6f 74 73 66 6f 6f 29 0a | 20 20 20 20 28 5c 68 79 |otsfoo).| (\hy|
|00001320| 70 65 72 7b 74 65 73 74 | 7d 20 5c 68 79 70 65 72 |per{test|} \hyper|
|00001330| 7b 73 65 71 75 65 6e 63 | 65 7d 29 0a 20 20 5c 68 |{sequenc|e}). \h|
|00001340| 79 70 65 72 69 7b 63 6f | 6d 6d 61 6e 64 7d 20 5c |yperi{co|mmand} \|
|00001350| 64 6f 74 73 66 6f 6f 29 | 0a 5c 69 65 74 20 20 28 |dotsfoo)|.\iet (|
|00001360| 6c 65 74 72 65 63 20 28 | 28 5c 68 79 70 65 72 7b |letrec (|(\hyper{|
|00001370| 6c 6f 6f 70 7d 0a 20 20 | 20 20 20 20 20 20 20 20 |loop}. | |
|00001380| 20 20 20 20 20 20 28 6c | 61 6d 62 64 61 20 28 5c | (l|ambda (\|
|00001390| 68 79 70 65 72 69 7b 76 | 61 72 69 61 62 6c 65 7d |hyperi{v|ariable}|
|000013a0| 20 5c 64 6f 74 73 66 6f | 6f 29 0a 20 20 20 20 20 | \dotsfo|o). |
|000013b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 28 69 66 | | (if|
|000013c0| 20 5c 68 79 70 65 72 7b | 74 65 73 74 7d 0a 20 20 | \hyper{|test}. |
|000013d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000013e0| 20 20 20 20 28 62 65 67 | 69 6e 20 5c 68 79 70 65 | (beg|in \hype|
|000013f0| 72 7b 73 65 71 75 65 6e | 63 65 7d 29 0a 20 20 20 |r{sequen|ce}). |
|00001400| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001410| 20 20 20 28 62 65 67 69 | 6e 20 5c 68 79 70 65 72 | (begi|n \hyper|
|00001420| 69 7b 63 6f 6d 6d 61 6e | 64 7d 0a 20 20 20 20 20 |i{comman|d}. |
|00001430| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001440| 20 20 20 20 20 20 20 20 | 5c 64 6f 74 73 66 6f 6f | |\dotsfoo|
|00001450| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001460| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 28 5c | | (\|
|00001470| 68 79 70 65 72 7b 6c 6f | 6f 70 7d 20 5c 68 79 70 |hyper{lo|op} \hyp|
|00001480| 65 72 69 7b 73 74 65 70 | 7d 20 5c 64 6f 74 73 66 |eri{step|} \dotsf|
|00001490| 6f 6f 29 29 29 29 29 29 | 0a 20 20 20 20 20 20 20 |oo))))))|. |
|000014a0| 20 28 5c 68 79 70 65 72 | 7b 6c 6f 6f 70 7d 20 5c | (\hyper|{loop} \|
|000014b0| 68 79 70 65 72 69 7b 69 | 6e 69 74 7d 20 5c 64 6f |hyperi{i|nit} \do|
|000014c0| 74 73 66 6f 6f 29 29 25 | 0a 5c 65 6e 64 7b 73 63 |tsfoo))%|.\end{sc|
|000014d0| 68 65 6d 65 6e 6f 69 6e | 64 65 6e 74 7d 0a 77 68 |hemenoin|dent}.wh|
|000014e0| 65 72 65 20 5c 68 79 70 | 65 72 7b 6c 6f 6f 70 7d |ere \hyp|er{loop}|
|000014f0| 20 69 73 20 61 6e 79 20 | 76 61 72 69 61 62 6c 65 | is any |variable|
|00001500| 20 77 68 69 63 68 20 69 | 73 20 64 69 73 74 69 6e | which i|s distin|
|00001510| 63 74 20 66 72 6f 6d 0a | 5c 68 79 70 65 72 69 7b |ct from.|\hyperi{|
|00001520| 76 61 72 69 61 62 6c 65 | 7d 2c 7e 5c 64 6f 74 73 |variable|},~\dots|
|00001530| 66 6f 6f 2c 20 61 6e 64 | 20 77 68 69 63 68 20 64 |foo, and| which d|
|00001540| 6f 65 73 20 6e 6f 74 20 | 6f 63 63 75 72 20 66 72 |oes not |occur fr|
|00001550| 65 65 20 69 6e 20 74 68 | 65 20 5c 69 64 65 7b 64 |ee in th|e \ide{d|
|00001560| 6f 7d 0a 65 78 70 72 65 | 73 73 69 6f 6e 2e 0a 0a |o}.expre|ssion...|
|00001570| 5c 62 65 67 69 6e 7b 73 | 63 68 65 6d 65 6e 6f 69 |\begin{s|chemenoi|
|00001580| 6e 64 65 6e 74 7d 0a 28 | 6c 65 74 20 5c 68 79 70 |ndent}.(|let \hyp|
|00001590| 65 72 7b 76 61 72 69 61 | 62 6c 65 24 5f 30 24 7d |er{varia|ble$_0$}|
|000015a0| 20 28 28 5c 68 79 70 65 | 72 69 7b 76 61 72 69 61 | ((\hype|ri{varia|
|000015b0| 62 6c 65 7d 20 5c 68 79 | 70 65 72 69 7b 69 6e 69 |ble} \hy|peri{ini|
|000015c0| 74 7d 29 20 5c 64 6f 74 | 73 66 6f 6f 29 0a 20 20 |t}) \dot|sfoo). |
|000015d0| 5c 68 79 70 65 72 7b 62 | 6f 64 79 7d 29 0a 5c 69 |\hyper{b|ody}).\i|
|000015e0| 65 74 20 20 28 28 6c 65 | 74 72 65 63 20 28 28 5c |et ((le|trec ((\|
|000015f0| 68 79 70 65 72 7b 76 61 | 72 69 61 62 6c 65 24 5f |hyper{va|riable$_|
|00001600| 30 24 7d 20 28 6c 61 6d | 62 64 61 20 28 5c 68 79 |0$} (lam|bda (\hy|
|00001610| 70 65 72 69 7b 76 61 72 | 69 61 62 6c 65 7d 20 5c |peri{var|iable} \|
|00001620| 64 6f 74 73 66 6f 6f 29 | 0a 20 20 20 20 20 20 20 |dotsfoo)|. |
|00001630| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001640| 20 20 20 20 20 20 5c 68 | 79 70 65 72 7b 62 6f 64 | \h|yper{bod|
|00001650| 79 7d 29 29 29 0a 20 20 | 20 20 20 20 20 20 20 20 |y}))). | |
|00001660| 5c 68 79 70 65 72 7b 76 | 61 72 69 61 62 6c 65 24 |\hyper{v|ariable$|
|00001670| 5f 30 24 7d 29 0a 20 20 | 20 20 20 20 20 5c 68 79 |_0$}). | \hy|
|00001680| 70 65 72 69 7b 69 6e 69 | 74 7d 20 5c 64 6f 74 73 |peri{ini|t} \dots|
|00001690| 66 6f 6f 29 0a 0a 28 64 | 65 6c 61 79 20 5c 68 79 |foo)..(d|elay \hy|
|000016a0| 70 65 72 7b 65 78 70 72 | 65 73 73 69 6f 6e 7d 29 |per{expr|ession})|
|000016b0| 0a 5c 69 65 74 20 20 28 | 5c 68 79 70 65 72 7b 6d |.\iet (|\hyper{m|
|000016c0| 61 6b 65 2d 70 72 6f 6d | 69 73 65 7d 20 28 6c 61 |ake-prom|ise} (la|
|000016d0| 6d 62 64 61 20 28 29 20 | 5c 68 79 70 65 72 7b 65 |mbda () |\hyper{e|
|000016e0| 78 70 72 65 73 73 69 6f | 6e 7d 29 29 25 0a 5c 65 |xpressio|n}))%.\e|
|000016f0| 6e 64 7b 73 63 68 65 6d | 65 6e 6f 69 6e 64 65 6e |nd{schem|enoinden|
|00001700| 74 7d 0a 77 68 65 72 65 | 20 5c 68 79 70 65 72 7b |t}.where| \hyper{|
|00001710| 6d 61 6b 65 2d 70 72 6f | 6d 69 73 65 7d 20 69 73 |make-pro|mise} is|
|00001720| 20 61 6e 20 65 78 70 72 | 65 73 73 69 6f 6e 20 65 | an expr|ession e|
|00001730| 76 61 6c 75 61 74 69 6e | 67 20 74 6f 20 73 6f 6d |valuatin|g to som|
|00001740| 65 20 70 72 6f 63 65 64 | 75 72 65 0a 77 68 69 63 |e proced|ure.whic|
|00001750| 68 20 62 65 68 61 76 65 | 73 20 61 70 70 72 6f 70 |h behave|s approp|
|00001760| 72 69 61 74 65 6c 79 20 | 77 69 74 68 20 72 65 73 |riately |with res|
|00001770| 70 65 63 74 20 74 6f 20 | 74 68 65 20 5c 69 64 65 |pect to |the \ide|
|00001780| 7b 66 6f 72 63 65 7d 20 | 70 72 6f 63 65 64 75 72 |{force} |procedur|
|00001790| 65 3b 0a 73 65 65 20 73 | 65 63 74 69 6f 6e 7e 5c |e;.see s|ection~\|
|000017a0| 72 65 66 7b 66 6f 72 63 | 65 7d 2e 0a 0a 25 20 60 |ref{forc|e}...% `|
|000017b0| 61 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |a | |
|000017c0| 20 3d 20 20 51 5f 31 5b | 61 5d 0a 25 20 60 28 61 | = Q_1[|a].% `(a|
|000017d0| 20 62 20 63 20 2e 2e 2e | 20 2e 20 7a 29 20 20 3d | b c ...| . z) =|
|000017e0| 20 20 60 28 61 20 2e 20 | 28 62 20 63 20 2e 2e 2e | `(a . |(b c ...|
|000017f0| 29 29 0a 25 20 60 28 61 | 20 2e 20 62 29 20 20 20 |)).% `(a| . b) |
|00001800| 20 20 20 20 20 20 20 3d | 20 20 28 61 70 70 65 6e | =| (appen|
|00001810| 64 20 51 2a 5f 30 5b 61 | 5d 20 60 62 29 0a 25 20 |d Q*_0[a|] `b).% |
|00001820| 60 28 61 29 20 20 20 20 | 20 20 20 20 20 20 20 20 |`(a) | |
|00001830| 20 20 3d 20 20 51 2a 5f | 30 5b 61 5d 0a 25 20 51 | = Q*_|0[a].% Q|
|00001840| 2a 5f 30 5b 61 5d 20 20 | 20 20 20 20 20 20 20 20 |*_0[a] | |
|00001850| 20 3d 20 20 28 6c 69 73 | 74 20 27 61 29 0a 25 20 | = (lis|t 'a).% |
|00001860| 51 2a 5f 30 5b 2c 61 5d | 20 20 20 20 20 20 20 20 |Q*_0[,a]| |
|00001870| 20 20 3d 20 20 28 6c 69 | 73 74 20 61 29 0a 25 20 | = (li|st a).% |
|00001880| 51 2a 5f 30 5b 2c 40 61 | 5d 20 20 20 20 20 20 20 |Q*_0[,@a|] |
|00001890| 20 20 3d 20 20 61 0a 25 | 20 51 2a 5f 30 5b 60 61 | = a.%| Q*_0[`a|
|000018a0| 5d 20 20 20 20 20 20 20 | 20 20 20 3d 20 20 28 6c |] | = (l|
|000018b0| 69 73 74 20 27 71 75 61 | 73 69 71 75 6f 74 65 20 |ist 'qua|siquote |
|000018c0| 51 2a 5f 31 5b 61 5d 29 | 0a 25 20 60 23 28 61 20 |Q*_1[a])|.% `#(a |
|000018d0| 62 20 2e 2e 2e 29 20 20 | 20 20 20 20 20 3d 20 20 |b ...) | = |
|000018e0| 28 6c 69 73 74 2d 3e 76 | 65 63 74 6f 72 20 60 28 |(list->v|ector `(|
|000018f0| 61 20 62 20 2e 2e 2e 29 | 29 0a 25 20 20 75 67 68 |a b ...)|).% ugh|
|00001900| 2e 0a | |.. | |
+--------+-------------------------+-------------------------+--------+--------+