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| 25 5c 76 66 69 6c 6c 5c | 65 6a 65 63 74 0a 5c 63 |%\vfill\|eject.\c|
|00000010| 68 61 70 74 65 72 7b 45 | 78 70 72 65 73 73 69 6f |hapter{E|xpressio|
|00000020| 6e 73 7d 0a 5c 6c 61 62 | 65 6c 7b 65 78 70 72 65 |ns}.\lab|el{expre|
|00000030| 73 73 69 6f 6e 63 68 61 | 70 74 65 72 7d 0a 0a 5c |ssioncha|pter}..\|
|00000040| 6e 65 77 63 6f 6d 6d 61 | 6e 64 7b 5c 73 79 6e 74 |newcomma|nd{\synt|
|00000050| 61 78 7d 7b 7b 5c 65 6d | 20 53 79 6e 74 61 78 3a |ax}{{\em| Syntax:|
|00000060| 20 7d 7d 0a 5c 6e 65 77 | 63 6f 6d 6d 61 6e 64 7b | }}.\new|command{|
|00000070| 5c 73 65 6d 61 6e 74 69 | 63 73 7d 7b 7b 5c 65 6d |\semanti|cs}{{\em|
|00000080| 20 53 65 6d 61 6e 74 69 | 63 73 3a 20 7d 7d 0a 0a | Semanti|cs: }}..|
|00000090| 41 20 53 63 68 65 6d 65 | 20 65 78 70 72 65 73 73 |A Scheme| express|
|000000a0| 69 6f 6e 20 69 73 20 61 | 20 63 6f 6e 73 74 72 75 |ion is a| constru|
|000000b0| 63 74 20 74 68 61 74 20 | 72 65 74 75 72 6e 73 20 |ct that |returns |
|000000c0| 61 20 76 61 6c 75 65 2c | 20 73 75 63 68 20 61 73 |a value,| such as|
|000000d0| 20 61 0a 76 61 72 69 61 | 62 6c 65 20 72 65 66 65 | a.varia|ble refe|
|000000e0| 72 65 6e 63 65 2c 20 6c | 69 74 65 72 61 6c 2c 20 |rence, l|iteral, |
|000000f0| 70 72 6f 63 65 64 75 72 | 65 20 63 61 6c 6c 2c 20 |procedur|e call, |
|00000100| 6f 72 20 63 6f 6e 64 69 | 74 69 6f 6e 61 6c 2e 0a |or condi|tional..|
|00000110| 0a 45 78 70 72 65 73 73 | 69 6f 6e 20 74 79 70 65 |.Express|ion type|
|00000120| 73 20 61 72 65 20 63 61 | 74 65 67 6f 72 69 7a 65 |s are ca|tegorize|
|00000130| 64 20 61 73 20 7b 5c 65 | 6d 20 70 72 69 6d 69 74 |d as {\e|m primit|
|00000140| 69 76 65 7d 20 6f 72 20 | 7b 5c 65 6d 20 64 65 72 |ive} or |{\em der|
|00000150| 69 76 65 64 7d 2e 0a 50 | 72 69 6d 69 74 69 76 65 |ived}..P|rimitive|
|00000160| 20 65 78 70 72 65 73 73 | 69 6f 6e 20 74 79 70 65 | express|ion type|
|00000170| 73 20 69 6e 63 6c 75 64 | 65 20 76 61 72 69 61 62 |s includ|e variab|
|00000180| 6c 65 73 20 61 6e 64 20 | 70 72 6f 63 65 64 75 72 |les and |procedur|
|00000190| 65 20 63 61 6c 6c 73 2e | 0a 44 65 72 69 76 65 64 |e calls.|.Derived|
|000001a0| 20 65 78 70 72 65 73 73 | 69 6f 6e 20 74 79 70 65 | express|ion type|
|000001b0| 73 20 61 72 65 20 6e 6f | 74 20 73 65 6d 61 6e 74 |s are no|t semant|
|000001c0| 69 63 61 6c 6c 79 20 70 | 72 69 6d 69 74 69 76 65 |ically p|rimitive|
|000001d0| 2c 20 62 75 74 20 63 61 | 6e 20 69 6e 73 74 65 61 |, but ca|n instea|
|000001e0| 64 0a 62 65 20 65 78 70 | 6c 61 69 6e 65 64 20 69 |d.be exp|lained i|
|000001f0| 6e 20 74 65 72 6d 73 20 | 6f 66 20 74 68 65 20 70 |n terms |of the p|
|00000200| 72 69 6d 69 74 69 76 65 | 20 63 6f 6e 73 74 72 75 |rimitive| constru|
|00000210| 63 74 73 20 61 73 20 69 | 6e 0a 73 65 63 74 69 6f |cts as i|n.sectio|
|00000220| 6e 7e 5c 72 65 66 7b 64 | 65 72 69 76 65 64 73 65 |n~\ref{d|erivedse|
|00000230| 63 74 69 6f 6e 7d 2e 20 | 20 54 68 65 79 20 61 72 |ction}. | They ar|
|00000240| 65 20 72 65 64 75 6e 64 | 61 6e 74 20 69 6e 20 74 |e redund|ant in t|
|00000250| 68 65 20 73 74 72 69 63 | 74 20 73 65 6e 73 65 20 |he stric|t sense |
|00000260| 6f 66 0a 74 68 65 20 77 | 6f 72 64 2c 20 62 75 74 |of.the w|ord, but|
|00000270| 20 74 68 65 79 20 63 61 | 70 74 75 72 65 20 63 6f | they ca|pture co|
|00000280| 6d 6d 6f 6e 20 70 61 74 | 74 65 72 6e 73 20 6f 66 |mmon pat|terns of|
|00000290| 20 75 73 61 67 65 2c 20 | 61 6e 64 20 61 72 65 20 | usage, |and are |
|000002a0| 74 68 65 72 65 66 6f 72 | 65 0a 70 72 6f 76 69 64 |therefor|e.provid|
|000002b0| 65 64 20 61 73 20 63 6f | 6e 76 65 6e 69 65 6e 74 |ed as co|nvenient|
|000002c0| 20 61 62 62 72 65 76 69 | 61 74 69 6f 6e 73 2e 0a | abbrevi|ations..|
|000002d0| 0a 5c 73 65 63 74 69 6f | 6e 7b 50 72 69 6d 69 74 |.\sectio|n{Primit|
|000002e0| 69 76 65 20 65 78 70 72 | 65 73 73 69 6f 6e 20 74 |ive expr|ession t|
|000002f0| 79 70 65 73 7d 0a 5c 6c | 61 62 65 6c 7b 70 72 69 |ypes}.\l|abel{pri|
|00000300| 6d 69 74 69 76 65 78 70 | 73 7d 0a 0a 5c 73 75 62 |mitivexp|s}..\sub|
|00000310| 73 65 63 74 69 6f 6e 7b | 56 61 72 69 61 62 6c 65 |section{|Variable|
|00000320| 20 72 65 66 65 72 65 6e | 63 65 73 7d 5c 75 6e 73 | referen|ces}\uns|
|00000330| 65 63 74 69 6f 6e 0a 0a | 5c 62 65 67 69 6e 7b 65 |ection..|\begin{e|
|00000340| 6e 74 72 79 7d 7b 25 0a | 5c 70 70 72 6f 74 6f 7b |ntry}{%.|\pproto{|
|00000350| 5c 68 79 70 65 72 7b 76 | 61 72 69 61 62 6c 65 7d |\hyper{v|ariable}|
|00000360| 7d 7b 65 73 73 65 6e 74 | 69 61 6c 20 5c 65 78 70 |}{essent|ial \exp|
|00000370| 72 74 79 70 65 7d 7d 0a | 0a 41 6e 20 65 78 70 72 |rtype}}.|.An expr|
|00000380| 65 73 73 69 6f 6e 20 63 | 6f 6e 73 69 73 74 69 6e |ession c|onsistin|
|00000390| 67 20 6f 66 20 61 20 76 | 61 72 69 61 62 6c 65 5c |g of a v|ariable\|
|000003a0| 69 6e 64 65 78 7b 76 61 | 72 69 61 62 6c 65 7d 0a |index{va|riable}.|
|000003b0| 28 73 65 63 74 69 6f 6e | 7e 5c 72 65 66 7b 76 61 |(section|~\ref{va|
|000003c0| 72 69 61 62 6c 65 73 65 | 63 74 69 6f 6e 7d 29 20 |riablese|ction}) |
|000003d0| 69 73 20 61 20 76 61 72 | 69 61 62 6c 65 20 72 65 |is a var|iable re|
|000003e0| 66 65 72 65 6e 63 65 2e | 20 20 54 68 65 20 76 61 |ference.| The va|
|000003f0| 6c 75 65 20 6f 66 0a 74 | 68 65 20 76 61 72 69 61 |lue of.t|he varia|
|00000400| 62 6c 65 20 72 65 66 65 | 72 65 6e 63 65 20 69 73 |ble refe|rence is|
|00000410| 20 74 68 65 20 76 61 6c | 75 65 20 73 74 6f 72 65 | the val|ue store|
|00000420| 64 20 69 6e 20 74 68 65 | 20 6c 6f 63 61 74 69 6f |d in the| locatio|
|00000430| 6e 20 74 6f 20 77 68 69 | 63 68 20 74 68 65 0a 76 |n to whi|ch the.v|
|00000440| 61 72 69 61 62 6c 65 20 | 69 73 20 62 6f 75 6e 64 |ariable |is bound|
|00000450| 2e 20 20 49 74 20 69 73 | 20 61 6e 20 65 72 72 6f |. It is| an erro|
|00000460| 72 20 74 6f 20 72 65 66 | 65 72 65 6e 63 65 20 61 |r to ref|erence a|
|00000470| 6e 0a 75 6e 62 6f 75 6e | 64 5c 69 6e 64 65 78 7b |n.unboun|d\index{|
|00000480| 75 6e 62 6f 75 6e 64 7d | 20 76 61 72 69 61 62 6c |unbound}| variabl|
|00000490| 65 2e 0a 0a 5c 62 65 67 | 69 6e 7b 73 63 68 65 6d |e...\beg|in{schem|
|000004a0| 65 7d 0a 28 64 65 66 69 | 6e 65 20 78 20 32 38 29 |e}.(defi|ne x 28)|
|000004b0| 0a 78 20 20 20 5c 65 76 | 20 20 32 38 25 0a 5c 65 |.x \ev| 28%.\e|
|000004c0| 6e 64 7b 73 63 68 65 6d | 65 7d 0a 5c 65 6e 64 7b |nd{schem|e}.\end{|
|000004d0| 65 6e 74 72 79 7d 0a 0a | 5c 73 75 62 73 65 63 74 |entry}..|\subsect|
|000004e0| 69 6f 6e 7b 4c 69 74 65 | 72 61 6c 20 65 78 70 72 |ion{Lite|ral expr|
|000004f0| 65 73 73 69 6f 6e 73 7d | 5c 75 6e 73 65 63 74 69 |essions}|\unsecti|
|00000500| 6f 6e 0a 5c 6c 61 62 65 | 6c 7b 6c 69 74 65 72 61 |on.\labe|l{litera|
|00000510| 6c 73 65 63 74 69 6f 6e | 7d 0a 0a 5c 62 65 67 69 |lsection|}..\begi|
|00000520| 6e 7b 65 6e 74 72 79 7d | 7b 25 0a 5c 70 72 6f 74 |n{entry}|{%.\prot|
|00000530| 6f 7b 71 75 6f 74 65 7d | 7b 20 5c 68 79 70 65 72 |o{quote}|{ \hyper|
|00000540| 7b 64 61 74 75 6d 7d 7d | 7b 65 73 73 65 6e 74 69 |{datum}}|{essenti|
|00000550| 61 6c 20 5c 65 78 70 72 | 74 79 70 65 7d 0a 5c 70 |al \expr|type}.\p|
|00000560| 70 72 6f 74 6f 7b 5c 73 | 69 6e 67 6c 65 71 75 6f |proto{\s|inglequo|
|00000570| 74 65 5c 68 79 70 65 72 | 7b 64 61 74 75 6d 7d 7d |te\hyper|{datum}}|
|00000580| 7b 65 73 73 65 6e 74 69 | 61 6c 20 5c 65 78 70 72 |{essenti|al \expr|
|00000590| 74 79 70 65 7d 0a 5c 70 | 70 72 6f 74 6f 7b 5c 68 |type}.\p|proto{\h|
|000005a0| 79 70 65 72 7b 63 6f 6e | 73 74 61 6e 74 7d 7d 7b |yper{con|stant}}{|
|000005b0| 65 73 73 65 6e 74 69 61 | 6c 20 5c 65 78 70 72 74 |essentia|l \exprt|
|000005c0| 79 70 65 7d 7d 0a 0a 7b | 5c 63 66 20 28 71 75 6f |ype}}..{|\cf (quo|
|000005d0| 74 65 20 5c 68 79 70 65 | 72 7b 64 61 74 75 6d 7d |te \hype|r{datum}|
|000005e0| 29 7d 20 65 76 61 6c 75 | 61 74 65 73 20 74 6f 20 |)} evalu|ates to |
|000005f0| 5c 68 79 70 65 72 7b 64 | 61 74 75 6d 7d 2e 5c 6d |\hyper{d|atum}.\m|
|00000600| 61 69 6e 73 63 68 69 6e | 64 65 78 7b 27 7d 0a 5c |ainschin|dex{'}.\|
|00000610| 68 79 70 65 72 7b 44 61 | 74 75 6d 7d 0a 6d 61 79 |hyper{Da|tum}.may|
|00000620| 20 62 65 20 61 6e 79 20 | 65 78 74 65 72 6e 61 6c | be any |external|
|00000630| 20 72 65 70 72 65 73 65 | 6e 74 61 74 69 6f 6e 20 | represe|ntation |
|00000640| 6f 66 20 61 20 53 63 68 | 65 6d 65 20 6f 62 6a 65 |of a Sch|eme obje|
|00000650| 63 74 20 28 73 65 65 0a | 73 65 63 74 69 6f 6e 7e |ct (see.|section~|
|00000660| 5c 72 65 66 7b 65 78 74 | 65 72 6e 61 6c 72 65 70 |\ref{ext|ernalrep|
|00000670| 73 7d 29 2e 20 20 54 68 | 69 73 20 6e 6f 74 61 74 |s}). Th|is notat|
|00000680| 69 6f 6e 20 69 73 20 75 | 73 65 64 20 74 6f 20 69 |ion is u|sed to i|
|00000690| 6e 63 6c 75 64 65 20 6c | 69 74 65 72 61 6c 0a 63 |nclude l|iteral.c|
|000006a0| 6f 6e 73 74 61 6e 74 73 | 20 69 6e 20 53 63 68 65 |onstants| in Sche|
|000006b0| 6d 65 20 63 6f 64 65 2e | 20 5c 69 6e 64 65 78 7b |me code.| \index{|
|000006c0| 63 6f 6e 73 74 61 6e 74 | 7d 0a 0a 5c 62 65 67 69 |constant|}..\begi|
|000006d0| 6e 7b 73 63 68 65 6d 65 | 7d 25 0a 28 71 75 6f 74 |n{scheme|}%.(quot|
|000006e0| 65 20 61 29 20 20 20 20 | 20 20 20 20 20 20 20 20 |e a) | |
|000006f0| 20 20 20 20 20 20 20 20 | 20 5c 65 76 20 20 61 0a | | \ev a.|
|00000700| 28 71 75 6f 74 65 20 5c | 73 68 61 72 70 73 69 67 |(quote \|sharpsig|
|00000710| 6e 28 61 20 62 20 63 29 | 29 20 20 20 20 20 5c 65 |n(a b c)|) \e|
|00000720| 76 20 20 5c 23 28 61 20 | 62 20 63 29 0a 28 71 75 |v \#(a |b c).(qu|
|00000730| 6f 74 65 20 28 2b 20 31 | 20 32 29 29 20 20 20 20 |ote (+ 1| 2)) |
|00000740| 20 20 20 20 20 20 20 20 | 20 20 20 5c 65 76 20 20 | | \ev |
|00000750| 28 2b 20 31 20 32 29 25 | 0a 5c 65 6e 64 7b 73 63 |(+ 1 2)%|.\end{sc|
|00000760| 68 65 6d 65 7d 0a 0a 7b | 5c 63 66 20 28 71 75 6f |heme}..{|\cf (quo|
|00000770| 74 65 20 5c 68 79 70 65 | 72 7b 64 61 74 75 6d 7d |te \hype|r{datum}|
|00000780| 29 7d 20 6d 61 79 20 62 | 65 20 61 62 62 72 65 76 |)} may b|e abbrev|
|00000790| 69 61 74 65 64 20 61 73 | 0a 5c 73 69 6e 67 6c 65 |iated as|.\single|
|000007a0| 71 75 6f 74 65 5c 68 79 | 70 65 72 7b 64 61 74 75 |quote\hy|per{datu|
|000007b0| 6d 7d 2e 20 20 54 68 65 | 20 74 77 6f 20 6e 6f 74 |m}. The| two not|
|000007c0| 61 74 69 6f 6e 73 20 61 | 72 65 20 65 71 75 69 76 |ations a|re equiv|
|000007d0| 61 6c 65 6e 74 20 69 6e | 20 61 6c 6c 0a 72 65 73 |alent in| all.res|
|000007e0| 70 65 63 74 73 2e 0a 0a | 5c 62 65 67 69 6e 7b 73 |pects...|\begin{s|
|000007f0| 63 68 65 6d 65 7d 0a 27 | 61 20 20 20 20 20 20 20 |cheme}.'|a |
|00000800| 20 20 20 20 20 20 20 20 | 20 20 20 20 5c 65 76 20 | | \ev |
|00000810| 20 61 0a 27 5c 23 28 61 | 20 62 20 63 29 20 20 20 | a.'\#(a| b c) |
|00000820| 20 20 20 20 20 20 20 20 | 5c 65 76 20 20 5c 23 28 | |\ev \#(|
|00000830| 61 20 62 20 63 29 0a 27 | 28 29 20 20 20 20 20 20 |a b c).'|() |
|00000840| 20 20 20 20 20 20 20 20 | 20 20 20 20 5c 65 76 20 | | \ev |
|00000850| 20 28 29 0a 27 28 2b 20 | 31 20 32 29 20 20 20 20 | ().'(+ |1 2) |
|00000860| 20 20 20 20 20 20 20 20 | 20 5c 65 76 20 20 28 2b | | \ev (+|
|00000870| 20 31 20 32 29 0a 27 28 | 71 75 6f 74 65 20 61 29 | 1 2).'(|quote a)|
|00000880| 20 20 20 20 20 20 20 20 | 20 20 20 5c 65 76 20 20 | | \ev |
|00000890| 28 71 75 6f 74 65 20 61 | 29 0a 27 27 61 20 20 20 |(quote a|).''a |
|000008a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 5c | | \|
|000008b0| 65 76 20 20 28 71 75 6f | 74 65 20 61 29 25 0a 5c |ev (quo|te a)%.\|
|000008c0| 65 6e 64 7b 73 63 68 65 | 6d 65 7d 0a 0a 4e 75 6d |end{sche|me}..Num|
|000008d0| 65 72 69 63 61 6c 20 63 | 6f 6e 73 74 61 6e 74 73 |erical c|onstants|
|000008e0| 2c 20 73 74 72 69 6e 67 | 20 63 6f 6e 73 74 61 6e |, string| constan|
|000008f0| 74 73 2c 20 63 68 61 72 | 61 63 74 65 72 20 63 6f |ts, char|acter co|
|00000900| 6e 73 74 61 6e 74 73 2c | 20 61 6e 64 20 62 6f 6f |nstants,| and boo|
|00000910| 6c 65 61 6e 0a 63 6f 6e | 73 74 61 6e 74 73 20 65 |lean.con|stants e|
|00000920| 76 61 6c 75 61 74 65 20 | 60 60 74 6f 20 74 68 65 |valuate |``to the|
|00000930| 6d 73 65 6c 76 65 73 27 | 27 3b 20 74 68 65 79 20 |mselves'|'; they |
|00000940| 6e 65 65 64 20 6e 6f 74 | 20 62 65 20 71 75 6f 74 |need not| be quot|
|00000950| 65 64 2e 0a 0a 5c 62 65 | 67 69 6e 7b 73 63 68 65 |ed...\be|gin{sche|
|00000960| 6d 65 7d 0a 27 22 61 62 | 63 22 20 20 20 20 20 5c |me}.'"ab|c" \|
|00000970| 65 76 20 20 22 61 62 63 | 22 0a 22 61 62 63 22 20 |ev "abc|"."abc" |
|00000980| 20 20 20 20 20 5c 65 76 | 20 20 22 61 62 63 22 0a | \ev| "abc".|
|00000990| 27 31 34 35 39 33 32 20 | 20 20 20 5c 65 76 20 20 |'145932 | \ev |
|000009a0| 31 34 35 39 33 32 0a 31 | 34 35 39 33 32 20 20 20 |145932.1|45932 |
|000009b0| 20 20 5c 65 76 20 20 31 | 34 35 39 33 32 0a 27 5c | \ev 1|45932.'\|
|000009c0| 73 63 68 74 72 75 65 20 | 20 5c 65 76 20 20 5c 73 |schtrue | \ev \s|
|000009d0| 63 68 74 72 75 65 0a 5c | 73 63 68 74 72 75 65 20 |chtrue.\|schtrue |
|000009e0| 20 20 5c 65 76 20 20 5c | 73 63 68 74 72 75 65 25 | \ev \|schtrue%|
|000009f0| 0a 5c 65 6e 64 7b 73 63 | 68 65 6d 65 7d 0a 0a 41 |.\end{sc|heme}..A|
|00000a00| 73 20 6e 6f 74 65 64 20 | 69 6e 20 73 65 63 74 69 |s noted |in secti|
|00000a10| 6f 6e 7e 5c 72 65 66 7b | 73 74 6f 72 61 67 65 6d |on~\ref{|storagem|
|00000a20| 6f 64 65 6c 7d 2c 20 69 | 74 20 69 73 20 61 6e 20 |odel}, i|t is an |
|00000a30| 65 72 72 6f 72 20 74 6f | 20 61 6c 74 65 72 20 61 |error to| alter a|
|00000a40| 20 63 6f 6e 73 74 61 6e | 74 0a 28 69 2e 65 2e 7e | constan|t.(i.e.~|
|00000a50| 74 68 65 20 76 61 6c 75 | 65 20 6f 66 20 61 20 6c |the valu|e of a l|
|00000a60| 69 74 65 72 61 6c 20 65 | 78 70 72 65 73 73 69 6f |iteral e|xpressio|
|00000a70| 6e 29 20 75 73 69 6e 67 | 20 61 20 6d 75 74 61 74 |n) using| a mutat|
|00000a80| 69 6f 6e 20 70 72 6f 63 | 65 64 75 72 65 20 6c 69 |ion proc|edure li|
|00000a90| 6b 65 0a 5c 69 64 65 7b | 73 65 74 2d 63 61 72 21 |ke.\ide{|set-car!|
|00000aa0| 7d 5c 20 6f 72 20 5c 69 | 64 65 7b 73 74 72 69 6e |}\ or \i|de{strin|
|00000ab0| 67 2d 73 65 74 21 7d 2e | 20 5c 69 6e 64 65 78 7b |g-set!}.| \index{|
|00000ac0| 63 6f 6e 73 74 61 6e 74 | 7d 0a 0a 5c 65 6e 64 7b |constant|}..\end{|
|00000ad0| 65 6e 74 72 79 7d 0a 0a | 0a 5c 73 75 62 73 65 63 |entry}..|.\subsec|
|00000ae0| 74 69 6f 6e 7b 50 72 6f | 63 65 64 75 72 65 20 63 |tion{Pro|cedure c|
|00000af0| 61 6c 6c 73 7d 5c 75 6e | 73 65 63 74 69 6f 6e 0a |alls}\un|section.|
|00000b00| 0a 5c 62 65 67 69 6e 7b | 65 6e 74 72 79 7d 7b 25 |.\begin{|entry}{%|
|00000b10| 0a 5c 70 70 72 6f 74 6f | 7b 28 5c 68 79 70 65 72 |.\pproto|{(\hyper|
|00000b20| 7b 6f 70 65 72 61 74 6f | 72 7d 20 5c 68 79 70 65 |{operato|r} \hype|
|00000b30| 72 69 7b 6f 70 65 72 61 | 6e 64 7d 20 5c 64 6f 74 |ri{opera|nd} \dot|
|00000b40| 73 66 6f 6f 29 7d 7b 65 | 73 73 65 6e 74 69 61 6c |sfoo)}{e|ssential|
|00000b50| 20 5c 65 78 70 72 74 79 | 70 65 7d 7d 0a 0a 41 20 | \exprty|pe}}..A |
|00000b60| 70 72 6f 63 65 64 75 72 | 65 20 63 61 6c 6c 20 69 |procedur|e call i|
|00000b70| 73 20 77 72 69 74 74 65 | 6e 20 62 79 20 73 69 6d |s writte|n by sim|
|00000b80| 70 6c 79 20 65 6e 63 6c | 6f 73 69 6e 67 20 69 6e |ply encl|osing in|
|00000b90| 20 70 61 72 65 6e 74 68 | 65 73 65 73 0a 65 78 70 | parenth|eses.exp|
|00000ba0| 72 65 73 73 69 6f 6e 73 | 20 66 6f 72 20 74 68 65 |ressions| for the|
|00000bb0| 20 70 72 6f 63 65 64 75 | 72 65 20 74 6f 20 62 65 | procedu|re to be|
|00000bc0| 20 63 61 6c 6c 65 64 20 | 61 6e 64 20 74 68 65 20 | called |and the |
|00000bd0| 61 72 67 75 6d 65 6e 74 | 73 20 74 6f 20 62 65 0a |argument|s to be.|
|00000be0| 70 61 73 73 65 64 20 74 | 6f 20 69 74 2e 20 20 54 |passed t|o it. T|
|00000bf0| 68 65 20 6f 70 65 72 61 | 74 6f 72 20 61 6e 64 20 |he opera|tor and |
|00000c00| 6f 70 65 72 61 6e 64 20 | 65 78 70 72 65 73 73 69 |operand |expressi|
|00000c10| 6f 6e 73 20 61 72 65 20 | 65 76 61 6c 75 61 74 65 |ons are |evaluate|
|00000c20| 64 20 28 69 6e 20 61 6e | 0a 75 6e 73 70 65 63 69 |d (in an|.unspeci|
|00000c30| 66 69 65 64 20 6f 72 64 | 65 72 29 20 61 6e 64 20 |fied ord|er) and |
|00000c40| 74 68 65 20 72 65 73 75 | 6c 74 69 6e 67 20 70 72 |the resu|lting pr|
|00000c50| 6f 63 65 64 75 72 65 20 | 69 73 20 70 61 73 73 65 |ocedure |is passe|
|00000c60| 64 20 74 68 65 20 72 65 | 73 75 6c 74 69 6e 67 0a |d the re|sulting.|
|00000c70| 61 72 67 75 6d 65 6e 74 | 73 2e 5c 6d 61 69 6e 69 |argument|s.\maini|
|00000c80| 6e 64 65 78 7b 63 61 6c | 6c 7d 5c 6d 61 69 6e 69 |ndex{cal|l}\maini|
|00000c90| 6e 64 65 78 7b 70 72 6f | 63 65 64 75 72 65 20 63 |ndex{pro|cedure c|
|00000ca0| 61 6c 6c 7d 0a 5c 62 65 | 67 69 6e 7b 73 63 68 65 |all}.\be|gin{sche|
|00000cb0| 6d 65 7d 25 0a 28 2b 20 | 33 20 34 29 20 20 20 20 |me}%.(+ |3 4) |
|00000cc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000cd0| 20 20 20 20 20 20 5c 65 | 76 20 20 37 0a 28 28 69 | \e|v 7.((i|
|00000ce0| 66 20 5c 73 63 68 66 61 | 6c 73 65 20 2b 20 2a 29 |f \schfa|lse + *)|
|00000cf0| 20 33 20 34 29 20 20 20 | 20 20 20 20 20 20 5c 65 | 3 4) | \e|
|00000d00| 76 20 20 31 32 25 0a 5c | 65 6e 64 7b 73 63 68 65 |v 12%.\|end{sche|
|00000d10| 6d 65 7d 0a 0a 41 20 6e | 75 6d 62 65 72 20 6f 66 |me}..A n|umber of|
|00000d20| 20 70 72 6f 63 65 64 75 | 72 65 73 20 61 72 65 20 | procedu|res are |
|00000d30| 61 76 61 69 6c 61 62 6c | 65 20 61 73 20 74 68 65 |availabl|e as the|
|00000d40| 20 76 61 6c 75 65 73 20 | 6f 66 20 76 61 72 69 61 | values |of varia|
|00000d50| 62 6c 65 73 20 69 6e 20 | 74 68 65 0a 69 6e 69 74 |bles in |the.init|
|00000d60| 69 61 6c 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 3b |ial envi|ronment;|
|00000d70| 20 66 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 74 68 | for exa|mple, th|
|00000d80| 65 20 61 64 64 69 74 69 | 6f 6e 20 61 6e 64 20 6d |e additi|on and m|
|00000d90| 75 6c 74 69 70 6c 69 63 | 61 74 69 6f 6e 0a 70 72 |ultiplic|ation.pr|
|00000da0| 6f 63 65 64 75 72 65 73 | 20 69 6e 20 74 68 65 20 |ocedures| in the |
|00000db0| 61 62 6f 76 65 20 65 78 | 61 6d 70 6c 65 73 20 61 |above ex|amples a|
|00000dc0| 72 65 20 74 68 65 20 76 | 61 6c 75 65 73 20 6f 66 |re the v|alues of|
|00000dd0| 20 74 68 65 20 76 61 72 | 69 61 62 6c 65 73 20 5c | the var|iables \|
|00000de0| 69 64 65 7b 2b 7d 0a 61 | 6e 64 20 5c 69 64 65 7b |ide{+}.a|nd \ide{|
|00000df0| 2a 7d 2e 20 20 4e 65 77 | 20 70 72 6f 63 65 64 75 |*}. New| procedu|
|00000e00| 72 65 73 20 61 72 65 20 | 63 72 65 61 74 65 64 20 |res are |created |
|00000e10| 62 79 20 65 76 61 6c 75 | 61 74 69 6e 67 20 5c 6c |by evalu|ating \l|
|00000e20| 61 6d 62 64 61 65 78 70 | 7b 7d 73 0a 28 73 65 65 |ambdaexp|{}s.(see|
|00000e30| 20 73 65 63 74 69 6f 6e | 7e 5c 72 65 66 7b 6c 61 | section|~\ref{la|
|00000e40| 6d 62 64 61 7d 29 2e 0a | 5c 74 6f 64 6f 7b 41 74 |mbda})..|\todo{At|
|00000e50| 20 46 72 69 65 64 6d 61 | 6e 27 73 20 72 65 75 65 | Friedma|n's reue|
|00000e60| 73 74 2c 20 66 6c 75 73 | 68 65 64 20 6d 65 6e 74 |st, flus|hed ment|
|00000e70| 69 6f 6e 20 6f 66 20 6f | 74 68 65 72 20 77 61 79 |ion of o|ther way|
|00000e80| 73 2e 7d 0a 25 20 6f 72 | 20 64 65 66 69 6e 69 74 |s.}.% or| definit|
|00000e90| 69 6f 6e 73 20 28 73 65 | 65 20 73 65 63 74 69 6f |ions (se|e sectio|
|00000ea0| 6e 7e 5c 72 65 66 7b 64 | 65 66 69 6e 65 7d 29 2e |n~\ref{d|efine}).|
|00000eb0| 0a 0a 50 72 6f 63 65 64 | 75 72 65 20 63 61 6c 6c |..Proced|ure call|
|00000ec0| 73 20 61 72 65 20 61 6c | 73 6f 20 63 61 6c 6c 65 |s are al|so calle|
|00000ed0| 64 20 7b 5c 65 6d 20 63 | 6f 6d 62 69 6e 61 74 69 |d {\em c|ombinati|
|00000ee0| 6f 6e 73 7d 2e 0a 5c 6d | 61 69 6e 69 6e 64 65 78 |ons}..\m|ainindex|
|00000ef0| 7b 63 6f 6d 62 69 6e 61 | 74 69 6f 6e 7d 0a 0a 5c |{combina|tion}..\|
|00000f00| 62 65 67 69 6e 7b 6e 6f | 74 65 7d 20 49 6e 20 63 |begin{no|te} In c|
|00000f10| 6f 6e 74 72 61 73 74 20 | 74 6f 20 6f 74 68 65 72 |ontrast |to other|
|00000f20| 20 64 69 61 6c 65 63 74 | 73 20 6f 66 20 4c 69 73 | dialect|s of Lis|
|00000f30| 70 2c 20 74 68 65 20 6f | 72 64 65 72 20 6f 66 0a |p, the o|rder of.|
|00000f40| 65 76 61 6c 75 61 74 69 | 6f 6e 20 69 73 20 75 6e |evaluati|on is un|
|00000f50| 73 70 65 63 69 66 69 65 | 64 2c 20 61 6e 64 20 74 |specifie|d, and t|
|00000f60| 68 65 20 6f 70 65 72 61 | 74 6f 72 20 65 78 70 72 |he opera|tor expr|
|00000f70| 65 73 73 69 6f 6e 20 61 | 6e 64 20 74 68 65 20 6f |ession a|nd the o|
|00000f80| 70 65 72 61 6e 64 0a 65 | 78 70 72 65 73 73 69 6f |perand.e|xpressio|
|00000f90| 6e 73 20 61 72 65 20 61 | 6c 77 61 79 73 20 65 76 |ns are a|lways ev|
|00000fa0| 61 6c 75 61 74 65 64 20 | 77 69 74 68 20 74 68 65 |aluated |with the|
|00000fb0| 20 73 61 6d 65 20 65 76 | 61 6c 75 61 74 69 6f 6e | same ev|aluation|
|00000fc0| 20 72 75 6c 65 73 2e 0a | 5c 65 6e 64 7b 6e 6f 74 | rules..|\end{not|
|00000fd0| 65 7d 0a 0a 5c 62 65 67 | 69 6e 7b 6e 6f 74 65 7d |e}..\beg|in{note}|
|00000fe0| 0a 41 6c 74 68 6f 75 67 | 68 20 74 68 65 20 6f 72 |.Althoug|h the or|
|00000ff0| 64 65 72 20 6f 66 20 65 | 76 61 6c 75 61 74 69 6f |der of e|valuatio|
|00001000| 6e 20 69 73 20 6f 74 68 | 65 72 77 69 73 65 20 75 |n is oth|erwise u|
|00001010| 6e 73 70 65 63 69 66 69 | 65 64 2c 20 74 68 65 20 |nspecifi|ed, the |
|00001020| 65 66 66 65 63 74 20 6f | 66 0a 61 6e 79 20 63 6f |effect o|f.any co|
|00001030| 6e 63 75 72 72 65 6e 74 | 20 65 76 61 6c 75 61 74 |ncurrent| evaluat|
|00001040| 69 6f 6e 20 6f 66 20 74 | 68 65 20 6f 70 65 72 61 |ion of t|he opera|
|00001050| 74 6f 72 20 61 6e 64 20 | 6f 70 65 72 61 6e 64 20 |tor and |operand |
|00001060| 65 78 70 72 65 73 73 69 | 6f 6e 73 20 69 73 0a 63 |expressi|ons is.c|
|00001070| 6f 6e 73 74 72 61 69 6e | 65 64 20 74 6f 20 62 65 |onstrain|ed to be|
|00001080| 20 63 6f 6e 73 69 73 74 | 65 6e 74 20 77 69 74 68 | consist|ent with|
|00001090| 20 73 6f 6d 65 20 73 65 | 71 75 65 6e 74 69 61 6c | some se|quential|
|000010a0| 20 6f 72 64 65 72 20 6f | 66 20 65 76 61 6c 75 61 | order o|f evalua|
|000010b0| 74 69 6f 6e 2e 0a 54 68 | 65 20 6f 72 64 65 72 20 |tion..Th|e order |
|000010c0| 6f 66 20 65 76 61 6c 75 | 61 74 69 6f 6e 20 6d 61 |of evalu|ation ma|
|000010d0| 79 20 62 65 20 63 68 6f | 73 65 6e 20 64 69 66 66 |y be cho|sen diff|
|000010e0| 65 72 65 6e 74 6c 79 20 | 66 6f 72 20 65 61 63 68 |erently |for each|
|000010f0| 20 70 72 6f 63 65 64 75 | 72 65 20 63 61 6c 6c 2e | procedu|re call.|
|00001100| 0a 5c 65 6e 64 7b 6e 6f | 74 65 7d 0a 0a 5c 62 65 |.\end{no|te}..\be|
|00001110| 67 69 6e 7b 6e 6f 74 65 | 7d 20 49 6e 20 6d 61 6e |gin{note|} In man|
|00001120| 79 20 64 69 61 6c 65 63 | 74 73 20 6f 66 20 4c 69 |y dialec|ts of Li|
|00001130| 73 70 2c 20 74 68 65 20 | 65 6d 70 74 79 20 63 6f |sp, the |empty co|
|00001140| 6d 62 69 6e 61 74 69 6f | 6e 2c 20 7b 5c 74 74 0a |mbinatio|n, {\tt.|
|00001150| 28 29 7d 2c 20 69 73 20 | 61 20 6c 65 67 69 74 69 |()}, is |a legiti|
|00001160| 6d 61 74 65 20 65 78 70 | 72 65 73 73 69 6f 6e 2e |mate exp|ression.|
|00001170| 20 20 49 6e 20 53 63 68 | 65 6d 65 2c 20 63 6f 6d | In Sch|eme, com|
|00001180| 62 69 6e 61 74 69 6f 6e | 73 20 6d 75 73 74 20 68 |bination|s must h|
|00001190| 61 76 65 20 61 74 0a 6c | 65 61 73 74 20 6f 6e 65 |ave at.l|east one|
|000011a0| 20 73 75 62 65 78 70 72 | 65 73 73 69 6f 6e 2c 20 | subexpr|ession, |
|000011b0| 73 6f 20 7b 5c 74 74 20 | 28 29 7d 20 69 73 20 6e |so {\tt |()} is n|
|000011c0| 6f 74 20 61 20 73 79 6e | 74 61 63 74 69 63 61 6c |ot a syn|tactical|
|000011d0| 6c 79 20 76 61 6c 69 64 | 0a 65 78 70 72 65 73 73 |ly valid|.express|
|000011e0| 69 6f 6e 2e 20 20 5c 74 | 6f 64 6f 7b 44 79 62 76 |ion. \t|odo{Dybv|
|000011f0| 69 67 3a 20 60 60 69 74 | 20 73 68 6f 75 6c 64 20 |ig: ``it| should |
|00001200| 62 65 20 6f 62 76 69 6f | 75 73 20 66 72 6f 6d 20 |be obvio|us from |
|00001210| 74 68 65 20 73 79 6e 74 | 61 78 2e 27 27 7d 0a 5c |the synt|ax.''}.\|
|00001220| 65 6e 64 7b 6e 6f 74 65 | 7d 0a 0a 5c 74 6f 64 6f |end{note|}..\todo|
|00001230| 7b 46 72 65 65 6d 61 6e | 3a 0a 49 20 74 68 69 6e |{Freeman|:.I thin|
|00001240| 6b 20 61 6e 20 65 78 70 | 6c 61 6e 61 74 69 6f 6e |k an exp|lanation|
|00001250| 20 61 73 20 74 6f 20 77 | 68 79 20 65 76 61 6c 75 | as to w|hy evalu|
|00001260| 61 74 69 6f 6e 20 6f 72 | 64 65 72 20 69 73 20 6e |ation or|der is n|
|00001270| 6f 74 20 73 70 65 63 69 | 66 69 65 64 0a 73 68 6f |ot speci|fied.sho|
|00001280| 75 6c 64 20 62 65 20 69 | 6e 63 6c 75 64 65 64 2e |uld be i|ncluded.|
|00001290| 20 20 49 74 20 73 68 6f | 75 6c 64 20 6e 6f 74 20 | It sho|uld not |
|000012a0| 69 6e 63 6c 75 64 65 20 | 61 6e 79 20 72 65 66 65 |include |any refe|
|000012b0| 72 65 6e 63 65 20 74 6f | 20 70 61 72 61 6c 6c 65 |rence to| paralle|
|000012c0| 6c 0a 65 76 61 6c 75 61 | 74 69 6f 6e 2e 20 20 44 |l.evalua|tion. D|
|000012d0| 6f 65 73 20 61 6e 79 20 | 65 78 69 73 74 69 6e 67 |oes any |existing|
|000012e0| 20 63 6f 6d 70 69 6c 65 | 72 20 67 65 6e 65 72 61 | compile|r genera|
|000012f0| 74 65 20 62 65 74 74 65 | 72 20 63 6f 64 65 20 62 |te bette|r code b|
|00001300| 65 63 61 75 73 65 0a 74 | 68 65 20 65 76 61 6c 75 |ecause.t|he evalu|
|00001310| 61 74 69 6f 6e 20 6f 72 | 64 65 72 20 69 73 20 75 |ation or|der is u|
|00001320| 6e 73 70 65 63 69 66 69 | 65 64 3f 20 20 43 6c 69 |nspecifi|ed? Cli|
|00001330| 6e 67 65 72 3a 20 79 65 | 73 3a 20 54 33 2c 20 4d |nger: ye|s: T3, M|
|00001340| 61 63 53 63 68 65 6d 65 | 20 76 32 2c 0a 70 72 6f |acScheme| v2,.pro|
|00001350| 62 61 62 6c 79 20 4d 49 | 54 20 53 63 68 65 6d 65 |bably MI|T Scheme|
|00001360| 20 61 6e 64 20 43 68 65 | 7a 20 53 63 68 65 6d 65 | and Che|z Scheme|
|00001370| 2e 20 20 42 75 74 20 74 | 68 61 74 27 73 20 6e 6f |. But t|hat's no|
|00001380| 74 20 74 68 65 20 6d 61 | 69 6e 20 72 65 61 73 6f |t the ma|in reaso|
|00001390| 6e 0a 66 6f 72 20 6c 65 | 61 76 69 6e 67 20 74 68 |n.for le|aving th|
|000013a0| 65 20 6f 72 64 65 72 20 | 75 6e 73 70 65 63 69 66 |e order |unspecif|
|000013b0| 69 65 64 2e 7d 0a 0a 5c | 65 6e 64 7b 65 6e 74 72 |ied.}..\|end{entr|
|000013c0| 79 7d 0a 0a 0a 5c 73 75 | 62 73 65 63 74 69 6f 6e |y}...\su|bsection|
|000013d0| 7b 5c 4c 61 6d 62 64 61 | 65 78 70 7b 7d 73 7d 5c |{\Lambda|exp{}s}\|
|000013e0| 75 6e 73 65 63 74 69 6f | 6e 0a 5c 6c 61 62 65 6c |unsectio|n.\label|
|000013f0| 7b 6c 61 6d 62 61 7d 0a | 0a 5c 62 65 67 69 6e 7b |{lamba}.|.\begin{|
|00001400| 65 6e 74 72 79 7d 7b 25 | 0a 5c 70 72 6f 74 6f 7b |entry}{%|.\proto{|
|00001410| 6c 61 6d 62 64 61 7d 7b | 20 5c 68 79 70 65 72 7b |lambda}{| \hyper{|
|00001420| 66 6f 72 6d 61 6c 73 7d | 20 5c 68 79 70 65 72 7b |formals}| \hyper{|
|00001430| 62 6f 64 79 7d 7d 7b 65 | 73 73 65 6e 74 69 61 6c |body}}{e|ssential|
|00001440| 20 5c 65 78 70 72 74 79 | 70 65 7d 7d 0a 0a 5c 73 | \exprty|pe}}..\s|
|00001450| 79 6e 74 61 78 0a 5c 68 | 79 70 65 72 7b 46 6f 72 |yntax.\h|yper{For|
|00001460| 6d 61 6c 73 7d 20 73 68 | 6f 75 6c 64 20 62 65 20 |mals} sh|ould be |
|00001470| 61 20 66 6f 72 6d 61 6c | 20 61 72 67 75 6d 65 6e |a formal| argumen|
|00001480| 74 73 20 6c 69 73 74 20 | 61 73 20 64 65 73 63 72 |ts list |as descr|
|00001490| 69 62 65 64 20 62 65 6c | 6f 77 2c 0a 61 6e 64 20 |ibed bel|ow,.and |
|000014a0| 5c 68 79 70 65 72 7b 62 | 6f 64 79 7d 20 73 68 6f |\hyper{b|ody} sho|
|000014b0| 75 6c 64 20 62 65 20 61 | 20 73 65 71 75 65 6e 63 |uld be a| sequenc|
|000014c0| 65 20 6f 66 20 6f 6e 65 | 20 6f 72 20 6d 6f 72 65 |e of one| or more|
|000014d0| 20 65 78 70 72 65 73 73 | 69 6f 6e 73 2e 0a 0a 5c | express|ions...\|
|000014e0| 73 65 6d 61 6e 74 69 63 | 73 0a 5c 76 65 73 74 20 |semantic|s.\vest |
|000014f0| 41 20 5c 6c 61 6d 62 64 | 61 65 78 70 7b 7d 20 65 |A \lambd|aexp{} e|
|00001500| 76 61 6c 75 61 74 65 73 | 20 74 6f 20 61 20 70 72 |valuates| to a pr|
|00001510| 6f 63 65 64 75 72 65 2e | 20 20 54 68 65 20 65 6e |ocedure.| The en|
|00001520| 76 69 72 6f 6e 6d 65 6e | 74 20 69 6e 0a 65 66 66 |vironmen|t in.eff|
|00001530| 65 63 74 20 77 68 65 6e | 20 74 68 65 20 5c 6c 61 |ect when| the \la|
|00001540| 6d 62 64 61 65 78 70 7b | 7d 20 77 61 73 20 65 76 |mbdaexp{|} was ev|
|00001550| 61 6c 75 61 74 65 64 20 | 69 73 20 72 65 6d 65 6d |aluated |is remem|
|00001560| 62 65 72 65 64 20 61 73 | 20 70 61 72 74 20 6f 66 |bered as| part of|
|00001570| 20 74 68 65 0a 70 72 6f | 63 65 64 75 72 65 2e 20 | the.pro|cedure. |
|00001580| 20 57 68 65 6e 20 74 68 | 65 20 70 72 6f 63 65 64 | When th|e proced|
|00001590| 75 72 65 20 69 73 20 6c | 61 74 65 72 20 63 61 6c |ure is l|ater cal|
|000015a0| 6c 65 64 20 77 69 74 68 | 20 73 6f 6d 65 20 61 63 |led with| some ac|
|000015b0| 74 75 61 6c 0a 61 72 67 | 75 6d 65 6e 74 73 2c 20 |tual.arg|uments, |
|000015c0| 74 68 65 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 20 |the envi|ronment |
|000015d0| 69 6e 20 77 68 69 63 68 | 20 74 68 65 20 5c 6c 61 |in which| the \la|
|000015e0| 6d 62 64 61 65 78 70 7b | 7d 20 77 61 73 20 65 76 |mbdaexp{|} was ev|
|000015f0| 61 6c 75 61 74 65 64 20 | 77 69 6c 6c 0a 62 65 20 |aluated |will.be |
|00001600| 65 78 74 65 6e 64 65 64 | 20 62 79 20 62 69 6e 64 |extended| by bind|
|00001610| 69 6e 67 20 74 68 65 20 | 76 61 72 69 61 62 6c 65 |ing the |variable|
|00001620| 73 20 69 6e 20 74 68 65 | 20 66 6f 72 6d 61 6c 20 |s in the| formal |
|00001630| 61 72 67 75 6d 65 6e 74 | 20 6c 69 73 74 20 74 6f |argument| list to|
|00001640| 0a 66 72 65 73 68 20 6c | 6f 63 61 74 69 6f 6e 73 |.fresh l|ocations|
|00001650| 2c 20 74 68 65 20 63 6f | 72 72 65 73 70 6f 6e 64 |, the co|rrespond|
|00001660| 69 6e 67 20 61 63 74 75 | 61 6c 20 61 72 67 75 6d |ing actu|al argum|
|00001670| 65 6e 74 20 76 61 6c 75 | 65 73 20 77 69 6c 6c 20 |ent valu|es will |
|00001680| 62 65 20 73 74 6f 72 65 | 64 0a 69 6e 20 74 68 6f |be store|d.in tho|
|00001690| 73 65 20 6c 6f 63 61 74 | 69 6f 6e 73 2c 20 61 6e |se locat|ions, an|
|000016a0| 64 20 74 68 65 20 65 78 | 70 72 65 73 73 69 6f 6e |d the ex|pression|
|000016b0| 73 20 69 6e 20 74 68 65 | 20 62 6f 64 79 20 6f 66 |s in the| body of|
|000016c0| 20 74 68 65 20 5c 6c 61 | 6d 62 64 61 65 78 70 7b | the \la|mbdaexp{|
|000016d0| 7d 0a 77 69 6c 6c 20 62 | 65 20 65 76 61 6c 75 61 |}.will b|e evalua|
|000016e0| 74 65 64 20 73 65 71 75 | 65 6e 74 69 61 6c 6c 79 |ted sequ|entially|
|000016f0| 20 69 6e 20 74 68 65 20 | 65 78 74 65 6e 64 65 64 | in the |extended|
|00001700| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 2e 20 20 54 | environ|ment. T|
|00001710| 68 65 20 72 65 73 75 6c | 74 0a 6f 66 20 74 68 65 |he resul|t.of the|
|00001720| 20 6c 61 73 74 20 65 78 | 70 72 65 73 73 69 6f 6e | last ex|pression|
|00001730| 20 69 6e 20 74 68 65 20 | 62 6f 64 79 20 77 69 6c | in the |body wil|
|00001740| 6c 20 62 65 20 72 65 74 | 75 72 6e 65 64 20 61 73 |l be ret|urned as|
|00001750| 20 74 68 65 20 72 65 73 | 75 6c 74 20 6f 66 0a 74 | the res|ult of.t|
|00001760| 68 65 20 70 72 6f 63 65 | 64 75 72 65 20 63 61 6c |he proce|dure cal|
|00001770| 6c 2e 0a 0a 5c 62 65 67 | 69 6e 7b 73 63 68 65 6d |l...\beg|in{schem|
|00001780| 65 7d 0a 28 6c 61 6d 62 | 64 61 20 28 78 29 20 28 |e}.(lamb|da (x) (|
|00001790| 2b 20 78 20 78 29 29 20 | 20 20 20 20 20 5c 65 76 |+ x x)) | \ev|
|000017a0| 20 20 7b 5c 65 6d 7b 7d | 61 20 70 72 6f 63 65 64 | {\em{}|a proced|
|000017b0| 75 72 65 7d 0a 28 28 6c | 61 6d 62 64 61 20 28 78 |ure}.((l|ambda (x|
|000017c0| 29 20 28 2b 20 78 20 78 | 29 29 20 34 29 20 20 5c |) (+ x x|)) 4) \|
|000017d0| 65 76 20 20 38 0a 0a 28 | 64 65 66 69 6e 65 20 72 |ev 8..(|define r|
|000017e0| 65 76 65 72 73 65 2d 73 | 75 62 74 72 61 63 74 0a |everse-s|ubtract.|
|000017f0| 20 20 28 6c 61 6d 62 64 | 61 20 28 78 20 79 29 20 | (lambd|a (x y) |
|00001800| 28 2d 20 79 20 78 29 29 | 29 0a 28 72 65 76 65 72 |(- y x))|).(rever|
|00001810| 73 65 2d 73 75 62 74 72 | 61 63 74 20 37 20 31 30 |se-subtr|act 7 10|
|00001820| 29 20 20 20 20 20 20 20 | 20 20 5c 65 76 20 20 33 |) | \ev 3|
|00001830| 0a 0a 28 64 65 66 69 6e | 65 20 61 64 64 34 0a 20 |..(defin|e add4. |
|00001840| 20 28 6c 65 74 20 28 28 | 78 20 34 29 29 0a 20 20 | (let ((|x 4)). |
|00001850| 20 20 28 6c 61 6d 62 64 | 61 20 28 79 29 20 28 2b | (lambd|a (y) (+|
|00001860| 20 78 20 79 29 29 29 29 | 0a 28 61 64 64 34 20 36 | x y))))|.(add4 6|
|00001870| 29 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |) | |
|00001880| 20 20 20 20 20 20 20 20 | 20 5c 65 76 20 20 31 30 | | \ev 10|
|00001890| 25 0a 5c 65 6e 64 7b 73 | 63 68 65 6d 65 7d 0a 0a |%.\end{s|cheme}..|
|000018a0| 5c 68 79 70 65 72 7b 46 | 6f 72 6d 61 6c 73 7d 20 |\hyper{F|ormals} |
|000018b0| 73 68 6f 75 6c 64 20 68 | 61 76 65 20 6f 6e 65 20 |should h|ave one |
|000018c0| 6f 66 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |of the f|ollowing|
|000018d0| 20 66 6f 72 6d 73 3a 0a | 0a 5c 62 65 67 69 6e 7b | forms:.|.\begin{|
|000018e0| 69 74 65 6d 69 7a 65 7d | 0a 5c 69 74 65 6d 20 7b |itemize}|.\item {|
|000018f0| 5c 74 74 28 5c 68 79 70 | 65 72 69 7b 76 61 72 69 |\tt(\hyp|eri{vari|
|00001900| 61 62 6c 65 7d 20 5c 64 | 6f 74 73 66 6f 6f 29 7d |able} \d|otsfoo)}|
|00001910| 3a 0a 54 68 65 20 70 72 | 6f 63 65 64 75 72 65 20 |:.The pr|ocedure |
|00001920| 74 61 6b 65 73 20 61 20 | 66 69 78 65 64 20 6e 75 |takes a |fixed nu|
|00001930| 6d 62 65 72 20 6f 66 20 | 61 72 67 75 6d 65 6e 74 |mber of |argument|
|00001940| 73 3b 20 77 68 65 6e 20 | 74 68 65 20 70 72 6f 63 |s; when |the proc|
|00001950| 65 64 75 72 65 20 69 73 | 0a 63 61 6c 6c 65 64 2c |edure is|.called,|
|00001960| 20 74 68 65 20 61 72 67 | 75 6d 65 6e 74 73 20 77 | the arg|uments w|
|00001970| 69 6c 6c 20 62 65 20 73 | 74 6f 72 65 64 20 69 6e |ill be s|tored in|
|00001980| 20 74 68 65 20 62 69 6e | 64 69 6e 67 73 20 6f 66 | the bin|dings of|
|00001990| 20 74 68 65 0a 63 6f 72 | 72 65 73 70 6f 6e 64 69 | the.cor|respondi|
|000019a0| 6e 67 20 76 61 72 69 61 | 62 6c 65 73 2e 0a 0a 5c |ng varia|bles...\|
|000019b0| 69 74 65 6d 20 5c 68 79 | 70 65 72 7b 76 61 72 69 |item \hy|per{vari|
|000019c0| 61 62 6c 65 7d 3a 0a 54 | 68 65 20 70 72 6f 63 65 |able}:.T|he proce|
|000019d0| 64 75 72 65 20 74 61 6b | 65 73 20 61 6e 79 20 6e |dure tak|es any n|
|000019e0| 75 6d 62 65 72 20 6f 66 | 20 61 72 67 75 6d 65 6e |umber of| argumen|
|000019f0| 74 73 3b 20 77 68 65 6e | 20 74 68 65 20 70 72 6f |ts; when| the pro|
|00001a00| 63 65 64 75 72 65 20 69 | 73 0a 63 61 6c 6c 65 64 |cedure i|s.called|
|00001a10| 2c 20 74 68 65 20 73 65 | 71 75 65 6e 63 65 20 6f |, the se|quence o|
|00001a20| 66 20 61 63 74 75 61 6c | 20 61 72 67 75 6d 65 6e |f actual| argumen|
|00001a30| 74 73 20 69 73 20 63 6f | 6e 76 65 72 74 65 64 20 |ts is co|nverted |
|00001a40| 69 6e 74 6f 20 61 20 6e | 65 77 6c 79 0a 61 6c 6c |into a n|ewly.all|
|00001a50| 6f 63 61 74 65 64 20 6c | 69 73 74 2c 20 61 6e 64 |ocated l|ist, and|
|00001a60| 20 74 68 65 20 6c 69 73 | 74 20 69 73 20 73 74 6f | the lis|t is sto|
|00001a70| 72 65 64 20 69 6e 20 74 | 68 65 20 62 69 6e 64 69 |red in t|he bindi|
|00001a80| 6e 67 20 6f 66 20 74 68 | 65 0a 5c 68 79 70 65 72 |ng of th|e.\hyper|
|00001a90| 7b 76 61 72 69 61 62 6c | 65 7d 2e 0a 0a 5c 69 74 |{variabl|e}...\it|
|00001aa0| 65 6d 20 7b 5c 74 74 28 | 5c 68 79 70 65 72 69 7b |em {\tt(|\hyperi{|
|00001ab0| 76 61 72 69 61 62 6c 65 | 7d 20 5c 64 6f 74 73 66 |variable|} \dotsf|
|00001ac0| 6f 6f 7b 7d 20 5c 68 79 | 70 65 72 7b 76 61 72 69 |oo{} \hy|per{vari|
|00001ad0| 61 62 6c 65 24 5f 7b 6e | 2d 31 7d 24 7d 20 7b 5c |able$_{n|-1}$} {\|
|00001ae0| 62 66 2e 7d 5c 20 5c 68 | 79 70 65 72 6e 7b 76 61 |bf.}\ \h|ypern{va|
|00001af0| 72 69 61 62 6c 65 7d 29 | 7d 3a 0a 49 66 20 61 20 |riable})|}:.If a |
|00001b00| 73 70 61 63 65 2d 64 65 | 6c 69 6d 69 74 65 64 20 |space-de|limited |
|00001b10| 70 65 72 69 6f 64 20 70 | 72 65 63 65 64 65 73 20 |period p|recedes |
|00001b20| 74 68 65 20 6c 61 73 74 | 20 76 61 72 69 61 62 6c |the last| variabl|
|00001b30| 65 2c 20 74 68 65 6e 0a | 74 68 65 20 76 61 6c 75 |e, then.|the valu|
|00001b40| 65 20 73 74 6f 72 65 64 | 20 69 6e 20 74 68 65 20 |e stored| in the |
|00001b50| 62 69 6e 64 69 6e 67 20 | 6f 66 20 74 68 65 20 6c |binding |of the l|
|00001b60| 61 73 74 20 76 61 72 69 | 61 62 6c 65 20 77 69 6c |ast vari|able wil|
|00001b70| 6c 20 62 65 20 61 0a 6e | 65 77 6c 79 20 61 6c 6c |l be a.n|ewly all|
|00001b80| 6f 63 61 74 65 64 0a 6c | 69 73 74 20 6f 66 20 74 |ocated.l|ist of t|
|00001b90| 68 65 20 61 63 74 75 61 | 6c 20 61 72 67 75 6d 65 |he actua|l argume|
|00001ba0| 6e 74 73 20 6c 65 66 74 | 20 6f 76 65 72 20 61 66 |nts left| over af|
|00001bb0| 74 65 72 20 61 6c 6c 20 | 74 68 65 20 6f 74 68 65 |ter all |the othe|
|00001bc0| 72 20 61 63 74 75 61 6c | 0a 61 72 67 75 6d 65 6e |r actual|.argumen|
|00001bd0| 74 73 20 68 61 76 65 20 | 62 65 65 6e 20 6d 61 74 |ts have |been mat|
|00001be0| 63 68 65 64 20 75 70 20 | 61 67 61 69 6e 73 74 20 |ched up |against |
|00001bf0| 74 68 65 20 6f 74 68 65 | 72 20 66 6f 72 6d 61 6c |the othe|r formal|
|00001c00| 20 61 72 67 75 6d 65 6e | 74 73 2e 0a 5c 65 6e 64 | argumen|ts..\end|
|00001c10| 7b 69 74 65 6d 69 7a 65 | 7d 0a 0a 49 74 20 69 73 |{itemize|}..It is|
|00001c20| 20 61 6e 20 65 72 72 6f | 72 20 66 6f 72 20 61 20 | an erro|r for a |
|00001c30| 5c 68 79 70 65 72 7b 76 | 61 72 69 61 62 6c 65 7d |\hyper{v|ariable}|
|00001c40| 20 74 6f 20 61 70 70 65 | 61 72 20 6d 6f 72 65 20 | to appe|ar more |
|00001c50| 74 68 61 6e 20 6f 6e 63 | 65 20 69 6e 0a 5c 68 79 |than onc|e in.\hy|
|00001c60| 70 65 72 7b 66 6f 72 6d | 61 6c 73 7d 2e 0a 0a 5c |per{form|als}...\|
|00001c70| 62 65 67 69 6e 7b 73 63 | 68 65 6d 65 7d 0a 28 28 |begin{sc|heme}.((|
|00001c80| 6c 61 6d 62 64 61 20 78 | 20 78 29 20 33 20 34 20 |lambda x| x) 3 4 |
|00001c90| 35 20 36 29 20 20 20 20 | 20 20 20 20 20 20 5c 65 |5 6) | \e|
|00001ca0| 76 20 20 28 33 20 34 20 | 35 20 36 29 0a 28 28 6c |v (3 4 |5 6).((l|
|00001cb0| 61 6d 62 64 61 20 28 78 | 20 79 20 2e 20 7a 29 20 |ambda (x| y . z) |
|00001cc0| 7a 29 0a 20 33 20 34 20 | 35 20 36 29 20 20 20 20 |z). 3 4 |5 6) |
|00001cd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ce0| 20 20 20 5c 65 76 20 20 | 28 35 20 36 29 25 0a 5c | \ev |(5 6)%.\|
|00001cf0| 65 6e 64 7b 73 63 68 65 | 6d 65 7d 0a 0a 45 61 63 |end{sche|me}..Eac|
|00001d00| 68 20 70 72 6f 63 65 64 | 75 72 65 20 63 72 65 61 |h proced|ure crea|
|00001d10| 74 65 64 20 61 73 20 74 | 68 65 20 72 65 73 75 6c |ted as t|he resul|
|00001d20| 74 20 6f 66 20 65 76 61 | 6c 75 61 74 69 6e 67 20 |t of eva|luating |
|00001d30| 61 20 5c 6c 61 6d 62 64 | 61 65 78 70 7b 7d 20 69 |a \lambd|aexp{} i|
|00001d40| 73 20 74 61 67 67 65 64 | 0a 77 69 74 68 20 61 20 |s tagged|.with a |
|00001d50| 73 74 6f 72 61 67 65 20 | 6c 6f 63 61 74 69 6f 6e |storage |location|
|00001d60| 2c 20 69 6e 20 6f 72 64 | 65 72 20 74 6f 20 6d 61 |, in ord|er to ma|
|00001d70| 6b 65 20 5c 69 64 65 7b | 65 71 76 3f 7d 20 61 6e |ke \ide{|eqv?} an|
|00001d80| 64 0a 5c 69 64 65 7b 65 | 71 3f 7d 20 77 6f 72 6b |d.\ide{e|q?} work|
|00001d90| 20 6f 6e 20 70 72 6f 63 | 65 64 75 72 65 73 20 28 | on proc|edures (|
|00001da0| 73 65 65 20 73 65 63 74 | 69 6f 6e 7e 5c 72 65 66 |see sect|ion~\ref|
|00001db0| 7b 65 71 75 69 76 61 6c | 65 6e 63 65 73 65 63 74 |{equival|encesect|
|00001dc0| 69 6f 6e 7d 29 2e 0a 0a | 5c 65 6e 64 7b 65 6e 74 |ion})...|\end{ent|
|00001dd0| 72 79 7d 0a 0a 0a 5c 73 | 75 62 73 65 63 74 69 6f |ry}...\s|ubsectio|
|00001de0| 6e 7b 43 6f 6e 64 69 74 | 69 6f 6e 61 6c 73 7d 5c |n{Condit|ionals}\|
|00001df0| 75 6e 73 65 63 74 69 6f | 6e 0a 0a 5c 62 65 67 69 |unsectio|n..\begi|
|00001e00| 6e 7b 65 6e 74 72 79 7d | 7b 25 0a 5c 70 72 6f 74 |n{entry}|{%.\prot|
|00001e10| 6f 7b 69 66 7d 7b 20 5c | 68 79 70 65 72 7b 74 65 |o{if}{ \|hyper{te|
|00001e20| 73 74 7d 20 5c 68 79 70 | 65 72 7b 63 6f 6e 73 65 |st} \hyp|er{conse|
|00001e30| 71 75 65 6e 74 7d 20 5c | 68 79 70 65 72 7b 61 6c |quent} \|hyper{al|
|00001e40| 74 65 72 6e 61 74 65 7d | 7d 7b 65 73 73 65 6e 74 |ternate}|}{essent|
|00001e50| 69 61 6c 20 5c 65 78 70 | 72 74 79 70 65 7d 0a 5c |ial \exp|rtype}.\|
|00001e60| 70 72 6f 74 6f 7b 69 66 | 7d 7b 20 5c 68 79 70 65 |proto{if|}{ \hype|
|00001e70| 72 7b 74 65 73 74 7d 20 | 5c 68 79 70 65 72 7b 63 |r{test} |\hyper{c|
|00001e80| 6f 6e 73 65 71 75 65 6e | 74 7d 7d 7b 5c 65 78 70 |onsequen|t}}{\exp|
|00001e90| 72 74 79 70 65 7d 7d 20 | 20 25 5c 2f 20 69 66 20 |rtype}} | %\/ if |
|00001ea0| 68 79 70 65 72 20 3d 20 | 69 74 61 6c 69 63 0a 0a |hyper = |italic..|
|00001eb0| 5c 73 79 6e 74 61 78 0a | 5c 68 79 70 65 72 7b 54 |\syntax.|\hyper{T|
|00001ec0| 65 73 74 7d 2c 20 5c 68 | 79 70 65 72 7b 63 6f 6e |est}, \h|yper{con|
|00001ed0| 73 65 71 75 65 6e 74 7d | 2c 20 61 6e 64 20 5c 68 |sequent}|, and \h|
|00001ee0| 79 70 65 72 7b 61 6c 74 | 65 72 6e 61 74 65 7d 20 |yper{alt|ernate} |
|00001ef0| 6d 61 79 20 62 65 20 61 | 72 62 69 74 72 61 72 79 |may be a|rbitrary|
|00001f00| 0a 65 78 70 72 65 73 73 | 69 6f 6e 73 2e 0a 0a 5c |.express|ions...\|
|00001f10| 73 65 6d 61 6e 74 69 63 | 73 0a 41 6e 20 5c 69 64 |semantic|s.An \id|
|00001f20| 65 7b 69 66 7d 20 65 78 | 70 72 65 73 73 69 6f 6e |e{if} ex|pression|
|00001f30| 20 69 73 20 65 76 61 6c | 75 61 74 65 64 20 61 73 | is eval|uated as|
|00001f40| 20 66 6f 6c 6c 6f 77 73 | 3a 20 66 69 72 73 74 2c | follows|: first,|
|00001f50| 0a 5c 68 79 70 65 72 7b | 74 65 73 74 7d 20 69 73 |.\hyper{|test} is|
|00001f60| 20 65 76 61 6c 75 61 74 | 65 64 2e 20 20 49 66 20 | evaluat|ed. If |
|00001f70| 69 74 20 79 69 65 6c 64 | 73 20 61 20 74 72 75 65 |it yield|s a true|
|00001f80| 20 76 61 6c 75 65 5c 69 | 6e 64 65 78 7b 74 72 75 | value\i|ndex{tru|
|00001f90| 65 7d 20 28 73 65 65 0a | 73 65 63 74 69 6f 6e 7e |e} (see.|section~|
|00001fa0| 5c 72 65 66 7b 62 6f 6f | 6c 65 61 6e 73 65 63 74 |\ref{boo|leansect|
|00001fb0| 69 6f 6e 7d 29 2c 20 74 | 68 65 6e 20 5c 68 79 70 |ion}), t|hen \hyp|
|00001fc0| 65 72 7b 63 6f 6e 73 65 | 71 75 65 6e 74 7d 20 69 |er{conse|quent} i|
|00001fd0| 73 20 65 76 61 6c 75 61 | 74 65 64 20 61 6e 64 0a |s evalua|ted and.|
|00001fe0| 69 74 73 20 76 61 6c 75 | 65 20 69 73 20 72 65 74 |its valu|e is ret|
|00001ff0| 75 72 6e 65 64 2e 20 20 | 4f 74 68 65 72 77 69 73 |urned. |Otherwis|
|00002000| 65 20 5c 68 79 70 65 72 | 7b 61 6c 74 65 72 6e 61 |e \hyper|{alterna|
|00002010| 74 65 7d 20 69 73 20 65 | 76 61 6c 75 61 74 65 64 |te} is e|valuated|
|00002020| 20 61 6e 64 20 69 74 73 | 0a 76 61 6c 75 65 20 69 | and its|.value i|
|00002030| 73 20 72 65 74 75 72 6e | 65 64 2e 20 20 49 66 20 |s return|ed. If |
|00002040| 5c 68 79 70 65 72 7b 74 | 65 73 74 7d 20 79 69 65 |\hyper{t|est} yie|
|00002050| 6c 64 73 20 61 20 66 61 | 6c 73 65 20 76 61 6c 75 |lds a fa|lse valu|
|00002060| 65 20 61 6e 64 20 6e 6f | 0a 5c 68 79 70 65 72 7b |e and no|.\hyper{|
|00002070| 61 6c 74 65 72 6e 61 74 | 65 7d 20 69 73 20 73 70 |alternat|e} is sp|
|00002080| 65 63 69 66 69 65 64 2c | 20 74 68 65 6e 20 74 68 |ecified,| then th|
|00002090| 65 20 72 65 73 75 6c 74 | 20 6f 66 20 74 68 65 20 |e result| of the |
|000020a0| 65 78 70 72 65 73 73 69 | 6f 6e 20 69 73 0a 75 6e |expressi|on is.un|
|000020b0| 73 70 65 63 69 66 69 65 | 64 2e 0a 0a 5c 62 65 67 |specifie|d...\beg|
|000020c0| 69 6e 7b 73 63 68 65 6d | 65 7d 0a 28 69 66 20 28 |in{schem|e}.(if (|
|000020d0| 3e 20 33 20 32 29 20 27 | 79 65 73 20 27 6e 6f 29 |> 3 2) '|yes 'no)|
|000020e0| 20 20 20 20 20 20 20 20 | 20 20 20 5c 65 76 20 20 | | \ev |
|000020f0| 79 65 73 0a 28 69 66 20 | 28 3e 20 32 20 33 29 20 |yes.(if |(> 2 3) |
|00002100| 27 79 65 73 20 27 6e 6f | 29 20 20 20 20 20 20 20 |'yes 'no|) |
|00002110| 20 20 20 20 5c 65 76 20 | 20 6e 6f 0a 28 69 66 20 | \ev | no.(if |
|00002120| 28 3e 20 33 20 32 29 0a | 20 20 20 20 28 2d 20 33 |(> 3 2).| (- 3|
|00002130| 20 32 29 0a 20 20 20 20 | 28 2b 20 33 20 32 29 29 | 2). |(+ 3 2))|
|00002140| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002150| 20 20 20 20 5c 65 76 20 | 20 31 25 0a 5c 65 6e 64 | \ev | 1%.\end|
|00002160| 7b 73 63 68 65 6d 65 7d | 0a 0a 5c 65 6e 64 7b 65 |{scheme}|..\end{e|
|00002170| 6e 74 72 79 7d 0a 0a 0a | 5c 73 75 62 73 65 63 74 |ntry}...|\subsect|
|00002180| 69 6f 6e 7b 41 73 73 69 | 67 6e 6d 65 6e 74 73 7d |ion{Assi|gnments}|
|00002190| 5c 75 6e 73 65 63 74 69 | 6f 6e 0a 0a 5c 62 65 67 |\unsecti|on..\beg|
|000021a0| 69 6e 7b 65 6e 74 72 79 | 7d 7b 25 0a 5c 70 72 6f |in{entry|}{%.\pro|
|000021b0| 74 6f 7b 73 65 74 21 7d | 7b 20 5c 68 79 70 65 72 |to{set!}|{ \hyper|
|000021c0| 7b 76 61 72 69 61 62 6c | 65 7d 20 5c 68 79 70 65 |{variabl|e} \hype|
|000021d0| 72 7b 65 78 70 72 65 73 | 73 69 6f 6e 7d 7d 7b 65 |r{expres|sion}}{e|
|000021e0| 73 73 65 6e 74 69 61 6c | 20 5c 65 78 70 72 74 79 |ssential| \exprty|
|000021f0| 70 65 7d 7d 0a 0a 5c 68 | 79 70 65 72 7b 45 78 70 |pe}}..\h|yper{Exp|
|00002200| 72 65 73 73 69 6f 6e 7d | 20 69 73 20 65 76 61 6c |ression}| is eval|
|00002210| 75 61 74 65 64 2c 20 61 | 6e 64 20 74 68 65 20 72 |uated, a|nd the r|
|00002220| 65 73 75 6c 74 69 6e 67 | 20 76 61 6c 75 65 20 69 |esulting| value i|
|00002230| 73 20 73 74 6f 72 65 64 | 20 69 6e 0a 74 68 65 20 |s stored| in.the |
|00002240| 6c 6f 63 61 74 69 6f 6e | 20 74 6f 20 77 68 69 63 |location| to whic|
|00002250| 68 20 5c 68 79 70 65 72 | 7b 76 61 72 69 61 62 6c |h \hyper|{variabl|
|00002260| 65 7d 20 69 73 20 62 6f | 75 6e 64 2e 20 20 5c 68 |e} is bo|und. \h|
|00002270| 79 70 65 72 7b 56 61 72 | 69 61 62 6c 65 7d 20 6d |yper{Var|iable} m|
|00002280| 75 73 74 0a 62 65 20 62 | 6f 75 6e 64 20 65 69 74 |ust.be b|ound eit|
|00002290| 68 65 72 20 69 6e 20 73 | 6f 6d 65 20 72 65 67 69 |her in s|ome regi|
|000022a0| 6f 6e 5c 69 6e 64 65 78 | 7b 72 65 67 69 6f 6e 7d |on\index|{region}|
|000022b0| 20 65 6e 63 6c 6f 73 69 | 6e 67 20 74 68 65 20 5c | enclosi|ng the \|
|000022c0| 69 64 65 7b 73 65 74 21 | 7d 5c 20 65 78 70 72 65 |ide{set!|}\ expre|
|000022d0| 73 73 69 6f 6e 0a 6f 72 | 20 61 74 20 74 6f 70 20 |ssion.or| at top |
|000022e0| 6c 65 76 65 6c 2e 20 20 | 54 68 65 20 72 65 73 75 |level. |The resu|
|000022f0| 6c 74 20 6f 66 20 74 68 | 65 20 5c 69 64 65 7b 73 |lt of th|e \ide{s|
|00002300| 65 74 21 7d 20 65 78 70 | 72 65 73 73 69 6f 6e 20 |et!} exp|ression |
|00002310| 69 73 0a 75 6e 73 70 65 | 63 69 66 69 65 64 2e 0a |is.unspe|cified..|
|00002320| 0a 5c 62 65 67 69 6e 7b | 73 63 68 65 6d 65 7d 0a |.\begin{|scheme}.|
|00002330| 28 64 65 66 69 6e 65 20 | 78 20 32 29 0a 28 2b 20 |(define |x 2).(+ |
|00002340| 78 20 31 29 20 20 20 20 | 20 20 20 20 20 20 20 20 |x 1) | |
|00002350| 20 20 20 20 20 5c 65 76 | 20 20 33 0a 28 73 65 74 | \ev| 3.(set|
|00002360| 21 20 78 20 34 29 20 20 | 20 20 20 20 20 20 20 20 |! x 4) | |
|00002370| 20 20 20 20 5c 65 76 20 | 20 5c 75 6e 73 70 65 63 | \ev | \unspec|
|00002380| 69 66 69 65 64 0a 28 2b | 20 78 20 31 29 20 20 20 |ified.(+| x 1) |
|00002390| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 5c 65 | | \e|
|000023a0| 76 20 20 35 25 0a 5c 65 | 6e 64 7b 73 63 68 65 6d |v 5%.\e|nd{schem|
|000023b0| 65 7d 0a 0a 5c 65 6e 64 | 7b 65 6e 74 72 79 7d 0a |e}..\end|{entry}.|
|000023c0| 0a 0a 5c 73 65 63 74 69 | 6f 6e 7b 44 65 72 69 76 |..\secti|on{Deriv|
|000023d0| 65 64 20 65 78 70 72 65 | 73 73 69 6f 6e 20 74 79 |ed expre|ssion ty|
|000023e0| 70 65 73 7d 0a 5c 6c 61 | 62 65 6c 7b 64 65 72 69 |pes}.\la|bel{deri|
|000023f0| 76 65 64 65 78 70 73 7d | 0a 0a 46 6f 72 20 72 65 |vedexps}|..For re|
|00002400| 66 65 72 65 6e 63 65 20 | 70 75 72 70 6f 73 65 73 |ference |purposes|
|00002410| 2c 20 73 65 63 74 69 6f | 6e 7e 5c 72 65 66 7b 64 |, sectio|n~\ref{d|
|00002420| 65 72 69 76 65 64 73 65 | 63 74 69 6f 6e 7d 20 67 |erivedse|ction} g|
|00002430| 69 76 65 73 20 72 65 77 | 72 69 74 65 20 72 75 6c |ives rew|rite rul|
|00002440| 65 73 0a 74 68 61 74 20 | 77 69 6c 6c 20 63 6f 6e |es.that |will con|
|00002450| 76 65 72 74 20 63 6f 6e | 73 74 72 75 63 74 73 20 |vert con|structs |
|00002460| 64 65 73 63 72 69 62 65 | 64 20 69 6e 20 74 68 69 |describe|d in thi|
|00002470| 73 20 73 65 63 74 69 6f | 6e 20 69 6e 74 6f 20 74 |s sectio|n into t|
|00002480| 68 65 0a 70 72 69 6d 69 | 74 69 76 65 20 63 6f 6e |he.primi|tive con|
|00002490| 73 74 72 75 63 74 73 20 | 64 65 73 63 72 69 62 65 |structs |describe|
|000024a0| 64 20 69 6e 20 74 68 65 | 20 70 72 65 76 69 6f 75 |d in the| previou|
|000024b0| 73 20 73 65 63 74 69 6f | 6e 2e 0a 0a 0a 5c 73 75 |s sectio|n....\su|
|000024c0| 62 73 65 63 74 69 6f 6e | 7b 43 6f 6e 64 69 74 69 |bsection|{Conditi|
|000024d0| 6f 6e 61 6c 73 7d 5c 75 | 6e 73 65 63 74 69 6f 6e |onals}\u|nsection|
|000024e0| 0a 0a 5c 62 65 67 69 6e | 7b 65 6e 74 72 79 7d 7b |..\begin|{entry}{|
|000024f0| 25 0a 5c 70 72 6f 74 6f | 7b 63 6f 6e 64 7d 7b 20 |%.\proto|{cond}{ |
|00002500| 5c 68 79 70 65 72 69 7b | 63 6c 61 75 73 65 7d 20 |\hyperi{|clause} |
|00002510| 5c 68 79 70 65 72 69 69 | 7b 63 6c 61 75 73 65 7d |\hyperii|{clause}|
|00002520| 20 5c 64 6f 74 73 66 6f | 6f 7d 7b 65 73 73 65 6e | \dotsfo|o}{essen|
|00002530| 74 69 61 6c 20 5c 65 78 | 70 72 74 79 70 65 7d 7d |tial \ex|prtype}}|
|00002540| 0a 0a 5c 73 79 6e 74 61 | 78 0a 45 61 63 68 20 5c |..\synta|x.Each \|
|00002550| 68 79 70 65 72 7b 63 6c | 61 75 73 65 7d 20 73 68 |hyper{cl|ause} sh|
|00002560| 6f 75 6c 64 20 62 65 20 | 6f 66 20 74 68 65 20 66 |ould be |of the f|
|00002570| 6f 72 6d 0a 5c 62 65 67 | 69 6e 7b 73 63 68 65 6d |orm.\beg|in{schem|
|00002580| 65 7d 0a 28 5c 68 79 70 | 65 72 7b 74 65 73 74 7d |e}.(\hyp|er{test}|
|00002590| 20 5c 68 79 70 65 72 7b | 65 78 70 72 65 73 73 69 | \hyper{|expressi|
|000025a0| 6f 6e 7d 20 5c 64 6f 74 | 73 66 6f 6f 29 25 0a 5c |on} \dot|sfoo)%.\|
|000025b0| 65 6e 64 7b 73 63 68 65 | 6d 65 7d 0a 77 68 65 72 |end{sche|me}.wher|
|000025c0| 65 20 5c 68 79 70 65 72 | 7b 74 65 73 74 7d 20 69 |e \hyper|{test} i|
|000025d0| 73 20 61 6e 79 20 65 78 | 70 72 65 73 73 69 6f 6e |s any ex|pression|
|000025e0| 2e 20 20 54 68 65 20 6c | 61 73 74 20 5c 68 79 70 |. The l|ast \hyp|
|000025f0| 65 72 7b 63 6c 61 75 73 | 65 7d 20 6d 61 79 20 62 |er{claus|e} may b|
|00002600| 65 0a 61 6e 20 60 60 65 | 6c 73 65 20 63 6c 61 75 |e.an ``e|lse clau|
|00002610| 73 65 2c 27 27 20 77 68 | 69 63 68 20 68 61 73 20 |se,'' wh|ich has |
|00002620| 74 68 65 20 66 6f 72 6d | 0a 5c 62 65 67 69 6e 7b |the form|.\begin{|
|00002630| 73 63 68 65 6d 65 7d 0a | 28 65 6c 73 65 20 5c 68 |scheme}.|(else \h|
|00002640| 79 70 65 72 69 7b 65 78 | 70 72 65 73 73 69 6f 6e |yperi{ex|pression|
|00002650| 7d 20 5c 68 79 70 65 72 | 69 69 7b 65 78 70 72 65 |} \hyper|ii{expre|
|00002660| 73 73 69 6f 6e 7d 20 5c | 64 6f 74 73 66 6f 6f 29 |ssion} \|dotsfoo)|
|00002670| 5c 72 6d 2e 25 0a 5c 65 | 6e 64 7b 73 63 68 65 6d |\rm.%.\e|nd{schem|
|00002680| 65 7d 0a 5c 6d 61 69 6e | 73 63 68 69 6e 64 65 78 |e}.\main|schindex|
|00002690| 7b 65 6c 73 65 7d 0a 5c | 6d 61 69 6e 73 63 68 69 |{else}.\|mainschi|
|000026a0| 6e 64 65 78 7b 3d 3e 7d | 0a 0a 5c 73 65 6d 61 6e |ndex{=>}|..\seman|
|000026b0| 74 69 63 73 0a 41 20 5c | 69 64 65 7b 63 6f 6e 64 |tics.A \|ide{cond|
|000026c0| 7d 20 65 78 70 72 65 73 | 73 69 6f 6e 20 69 73 20 |} expres|sion is |
|000026d0| 65 76 61 6c 75 61 74 65 | 64 20 62 79 20 65 76 61 |evaluate|d by eva|
|000026e0| 6c 75 61 74 69 6e 67 20 | 74 68 65 20 5c 68 79 70 |luating |the \hyp|
|000026f0| 65 72 7b 74 65 73 74 7d | 0a 65 78 70 72 65 73 73 |er{test}|.express|
|00002700| 69 6f 6e 73 20 6f 66 20 | 73 75 63 63 65 73 73 69 |ions of |successi|
|00002710| 76 65 20 5c 68 79 70 65 | 72 7b 63 6c 61 75 73 65 |ve \hype|r{clause|
|00002720| 7d 73 20 69 6e 20 6f 72 | 64 65 72 20 75 6e 74 69 |}s in or|der unti|
|00002730| 6c 20 6f 6e 65 20 6f 66 | 20 74 68 65 6d 0a 65 76 |l one of| them.ev|
|00002740| 61 6c 75 61 74 65 73 20 | 74 6f 20 61 20 74 72 75 |aluates |to a tru|
|00002750| 65 20 76 61 6c 75 65 5c | 69 6e 64 65 78 7b 74 72 |e value\|index{tr|
|00002760| 75 65 7d 20 28 73 65 65 | 0a 73 65 63 74 69 6f 6e |ue} (see|.section|
|00002770| 7e 5c 72 65 66 7b 62 6f | 6f 6c 65 61 6e 73 65 63 |~\ref{bo|oleansec|
|00002780| 74 69 6f 6e 7d 29 2e 20 | 20 57 68 65 6e 20 61 20 |tion}). | When a |
|00002790| 5c 68 79 70 65 72 7b 74 | 65 73 74 7d 20 65 76 61 |\hyper{t|est} eva|
|000027a0| 6c 75 61 74 65 73 20 74 | 6f 20 61 20 74 72 75 65 |luates t|o a true|
|000027b0| 0a 76 61 6c 75 65 2c 20 | 74 68 65 6e 20 74 68 65 |.value, |then the|
|000027c0| 20 72 65 6d 61 69 6e 69 | 6e 67 20 5c 68 79 70 65 | remaini|ng \hype|
|000027d0| 72 7b 65 78 70 72 65 73 | 73 69 6f 6e 7d 73 20 69 |r{expres|sion}s i|
|000027e0| 6e 20 69 74 73 20 5c 68 | 79 70 65 72 7b 63 6c 61 |n its \h|yper{cla|
|000027f0| 75 73 65 7d 20 61 72 65 | 0a 65 76 61 6c 75 61 74 |use} are|.evaluat|
|00002800| 65 64 20 69 6e 20 6f 72 | 64 65 72 2c 20 61 6e 64 |ed in or|der, and|
|00002810| 20 74 68 65 20 72 65 73 | 75 6c 74 20 6f 66 20 74 | the res|ult of t|
|00002820| 68 65 20 6c 61 73 74 20 | 5c 68 79 70 65 72 7b 65 |he last |\hyper{e|
|00002830| 78 70 72 65 73 73 69 6f | 6e 7d 20 69 6e 20 74 68 |xpressio|n} in th|
|00002840| 65 0a 5c 68 79 70 65 72 | 7b 63 6c 61 75 73 65 7d |e.\hyper|{clause}|
|00002850| 20 69 73 20 72 65 74 75 | 72 6e 65 64 20 61 73 20 | is retu|rned as |
|00002860| 74 68 65 20 72 65 73 75 | 6c 74 20 6f 66 20 74 68 |the resu|lt of th|
|00002870| 65 20 65 6e 74 69 72 65 | 20 5c 69 64 65 7b 63 6f |e entire| \ide{co|
|00002880| 6e 64 7d 0a 65 78 70 72 | 65 73 73 69 6f 6e 2e 20 |nd}.expr|ession. |
|00002890| 20 49 66 20 74 68 65 20 | 73 65 6c 65 63 74 65 64 | If the |selected|
|000028a0| 20 5c 68 79 70 65 72 7b | 63 6c 61 75 73 65 7d 20 | \hyper{|clause} |
|000028b0| 63 6f 6e 74 61 69 6e 73 | 20 6f 6e 6c 79 20 74 68 |contains| only th|
|000028c0| 65 0a 5c 68 79 70 65 72 | 7b 74 65 73 74 7d 20 61 |e.\hyper|{test} a|
|000028d0| 6e 64 20 6e 6f 20 5c 68 | 79 70 65 72 7b 65 78 70 |nd no \h|yper{exp|
|000028e0| 72 65 73 73 69 6f 6e 7d | 73 2c 20 74 68 65 6e 20 |ression}|s, then |
|000028f0| 74 68 65 20 76 61 6c 75 | 65 20 6f 66 20 74 68 65 |the valu|e of the|
|00002900| 0a 5c 68 79 70 65 72 7b | 74 65 73 74 7d 20 69 73 |.\hyper{|test} is|
|00002910| 20 72 65 74 75 72 6e 65 | 64 20 61 73 20 74 68 65 | returne|d as the|
|00002920| 20 72 65 73 75 6c 74 2e | 20 20 49 66 20 61 6c 6c | result.| If all|
|00002930| 20 5c 68 79 70 65 72 7b | 74 65 73 74 7d 73 20 65 | \hyper{|test}s e|
|00002940| 76 61 6c 75 61 74 65 0a | 74 6f 20 66 61 6c 73 65 |valuate.|to false|
|00002950| 20 76 61 6c 75 65 73 2c | 20 61 6e 64 20 74 68 65 | values,| and the|
|00002960| 72 65 20 69 73 20 6e 6f | 20 65 6c 73 65 20 63 6c |re is no| else cl|
|00002970| 61 75 73 65 2c 20 74 68 | 65 6e 20 74 68 65 20 72 |ause, th|en the r|
|00002980| 65 73 75 6c 74 20 6f 66 | 0a 74 68 65 20 63 6f 6e |esult of|.the con|
|00002990| 64 69 74 69 6f 6e 61 6c | 20 65 78 70 72 65 73 73 |ditional| express|
|000029a0| 69 6f 6e 20 69 73 20 75 | 6e 73 70 65 63 69 66 69 |ion is u|nspecifi|
|000029b0| 65 64 3b 20 69 66 20 74 | 68 65 72 65 20 69 73 20 |ed; if t|here is |
|000029c0| 61 6e 20 65 6c 73 65 0a | 63 6c 61 75 73 65 2c 20 |an else.|clause, |
|000029d0| 74 68 65 6e 20 69 74 73 | 20 5c 68 79 70 65 72 7b |then its| \hyper{|
|000029e0| 65 78 70 72 65 73 73 69 | 6f 6e 7d 73 20 61 72 65 |expressi|on}s are|
|000029f0| 20 65 76 61 6c 75 61 74 | 65 64 2c 20 61 6e 64 20 | evaluat|ed, and |
|00002a00| 74 68 65 20 76 61 6c 75 | 65 20 6f 66 0a 74 68 65 |the valu|e of.the|
|00002a10| 20 6c 61 73 74 20 6f 6e | 65 20 69 73 20 72 65 74 | last on|e is ret|
|00002a20| 75 72 6e 65 64 2e 0a 0a | 5c 62 65 67 69 6e 7b 73 |urned...|\begin{s|
|00002a30| 63 68 65 6d 65 7d 0a 28 | 63 6f 6e 64 20 28 28 3e |cheme}.(|cond ((>|
|00002a40| 20 33 20 32 29 20 27 67 | 72 65 61 74 65 72 29 0a | 3 2) 'g|reater).|
|00002a50| 20 20 20 20 20 20 28 28 | 3c 20 33 20 32 29 20 27 | ((|< 3 2) '|
|00002a60| 6c 65 73 73 29 29 20 20 | 20 20 20 20 20 20 20 5c |less)) | \|
|00002a70| 65 76 20 20 67 72 65 61 | 74 65 72 25 0a 0a 28 63 |ev grea|ter%..(c|
|00002a80| 6f 6e 64 20 28 28 3e 20 | 33 20 33 29 20 27 67 72 |ond ((> |3 3) 'gr|
|00002a90| 65 61 74 65 72 29 0a 20 | 20 20 20 20 20 28 28 3c |eater). | ((<|
|00002aa0| 20 33 20 33 29 20 27 6c | 65 73 73 29 0a 20 20 20 | 3 3) 'l|ess). |
|00002ab0| 20 20 20 28 65 6c 73 65 | 20 27 65 71 75 61 6c 29 | (else| 'equal)|
|00002ac0| 29 20 20 20 20 20 20 20 | 20 20 20 20 20 5c 65 76 |) | \ev|
|00002ad0| 20 20 65 71 75 61 6c 25 | 0a 5c 65 6e 64 7b 73 63 | equal%|.\end{sc|
|00002ae0| 68 65 6d 65 7d 0a 0a 53 | 6f 6d 65 20 69 6d 70 6c |heme}..S|ome impl|
|00002af0| 65 6d 65 6e 74 61 74 69 | 6f 6e 73 20 73 75 70 70 |ementati|ons supp|
|00002b00| 6f 72 74 20 61 6e 20 61 | 6c 74 65 72 6e 61 74 69 |ort an a|lternati|
|00002b10| 76 65 20 5c 68 79 70 65 | 72 7b 63 6c 61 75 73 65 |ve \hype|r{clause|
|00002b20| 7d 20 73 79 6e 74 61 78 | 2c 0a 7b 5c 74 74 28 5c |} syntax|,.{\tt(\|
|00002b30| 68 79 70 65 72 7b 74 65 | 73 74 7d 20 3d 3e 20 5c |hyper{te|st} => \|
|00002b40| 68 79 70 65 72 7b 72 65 | 63 69 70 69 65 6e 74 7d |hyper{re|cipient}|
|00002b50| 29 7d 2c 20 77 68 65 72 | 65 20 5c 68 79 70 65 72 |)}, wher|e \hyper|
|00002b60| 7b 72 65 63 69 70 69 65 | 6e 74 7d 20 69 73 20 61 |{recipie|nt} is a|
|00002b70| 6e 0a 65 78 70 72 65 73 | 73 69 6f 6e 2e 20 20 49 |n.expres|sion. I|
|00002b80| 66 20 5c 68 79 70 65 72 | 7b 74 65 73 74 7d 20 65 |f \hyper|{test} e|
|00002b90| 76 61 6c 75 61 74 65 73 | 20 74 6f 20 61 20 74 72 |valuates| to a tr|
|00002ba0| 75 65 20 76 61 6c 75 65 | 2c 20 74 68 65 6e 0a 5c |ue value|, then.\|
|00002bb0| 68 79 70 65 72 7b 72 65 | 63 69 70 69 65 6e 74 7d |hyper{re|cipient}|
|00002bc0| 20 69 73 20 65 76 61 6c | 75 61 74 65 64 2e 20 20 | is eval|uated. |
|00002bd0| 49 74 73 20 76 61 6c 75 | 65 20 6d 75 73 74 20 62 |Its valu|e must b|
|00002be0| 65 20 61 20 70 72 6f 63 | 65 64 75 72 65 20 6f 66 |e a proc|edure of|
|00002bf0| 20 6f 6e 65 0a 61 72 67 | 75 6d 65 6e 74 3b 20 74 | one.arg|ument; t|
|00002c00| 68 69 73 20 70 72 6f 63 | 65 64 75 72 65 20 69 73 |his proc|edure is|
|00002c10| 20 74 68 65 6e 20 69 6e | 76 6f 6b 65 64 20 6f 6e | then in|voked on|
|00002c20| 20 74 68 65 20 76 61 6c | 75 65 20 6f 66 20 74 68 | the val|ue of th|
|00002c30| 65 0a 5c 68 79 70 65 72 | 7b 74 65 73 74 7d 2e 0a |e.\hyper|{test}..|
|00002c40| 0a 5c 62 65 67 69 6e 7b | 73 63 68 65 6d 65 7d 0a |.\begin{|scheme}.|
|00002c50| 28 63 6f 6e 64 20 28 28 | 61 73 73 76 20 27 62 20 |(cond ((|assv 'b |
|00002c60| 27 28 28 61 20 31 29 20 | 28 62 20 32 29 29 29 20 |'((a 1) |(b 2))) |
|00002c70| 3d 3e 20 63 61 64 72 29 | 0a 20 20 20 20 20 20 28 |=> cadr)|. (|
|00002c80| 65 6c 73 65 20 5c 73 63 | 68 66 61 6c 73 65 7b 7d |else \sc|hfalse{}|
|00002c90| 29 29 20 20 20 20 20 20 | 20 20 20 5c 65 76 20 20 |)) | \ev |
|00002ca0| 32 25 0a 5c 65 6e 64 7b | 73 63 68 65 6d 65 7d 0a |2%.\end{|scheme}.|
|00002cb0| 0a 0a 5c 65 6e 64 7b 65 | 6e 74 72 79 7d 0a 0a 0a |..\end{e|ntry}...|
|00002cc0| 5c 62 65 67 69 6e 7b 65 | 6e 74 72 79 7d 7b 25 0a |\begin{e|ntry}{%.|
|00002cd0| 5c 70 72 6f 74 6f 7b 63 | 61 73 65 7d 7b 20 5c 68 |\proto{c|ase}{ \h|
|00002ce0| 79 70 65 72 7b 6b 65 79 | 7d 20 5c 68 79 70 65 72 |yper{key|} \hyper|
|00002cf0| 69 7b 63 6c 61 75 73 65 | 7d 20 5c 68 79 70 65 72 |i{clause|} \hyper|
|00002d00| 69 69 7b 63 6c 61 75 73 | 65 7d 20 5c 64 6f 74 73 |ii{claus|e} \dots|
|00002d10| 66 6f 6f 7d 7b 65 73 73 | 65 6e 74 69 61 6c 20 5c |foo}{ess|ential \|
|00002d20| 65 78 70 72 74 79 70 65 | 7d 7d 0a 0a 5c 73 79 6e |exprtype|}}..\syn|
|00002d30| 74 61 78 0a 5c 68 79 70 | 65 72 7b 4b 65 79 7d 20 |tax.\hyp|er{Key} |
|00002d40| 6d 61 79 20 62 65 20 61 | 6e 79 20 65 78 70 72 65 |may be a|ny expre|
|00002d50| 73 73 69 6f 6e 2e 20 20 | 45 61 63 68 20 5c 68 79 |ssion. |Each \hy|
|00002d60| 70 65 72 7b 63 6c 61 75 | 73 65 7d 20 73 68 6f 75 |per{clau|se} shou|
|00002d70| 6c 64 20 68 61 76 65 0a | 74 68 65 20 66 6f 72 6d |ld have.|the form|
|00002d80| 0a 5c 62 65 67 69 6e 7b | 73 63 68 65 6d 65 7d 0a |.\begin{|scheme}.|
|00002d90| 28 28 5c 68 79 70 65 72 | 69 7b 64 61 74 75 6d 7d |((\hyper|i{datum}|
|00002da0| 20 5c 64 6f 74 73 66 6f | 6f 29 20 5c 68 79 70 65 | \dotsfo|o) \hype|
|00002db0| 72 69 7b 65 78 70 72 65 | 73 73 69 6f 6e 7d 20 5c |ri{expre|ssion} \|
|00002dc0| 68 79 70 65 72 69 69 7b | 65 78 70 72 65 73 73 69 |hyperii{|expressi|
|00002dd0| 6f 6e 7d 20 5c 64 6f 74 | 73 66 6f 6f 29 5c 72 6d |on} \dot|sfoo)\rm|
|00002de0| 2c 25 0a 5c 65 6e 64 7b | 73 63 68 65 6d 65 7d 0a |,%.\end{|scheme}.|
|00002df0| 77 68 65 72 65 20 65 61 | 63 68 20 5c 68 79 70 65 |where ea|ch \hype|
|00002e00| 72 7b 64 61 74 75 6d 7d | 20 69 73 20 61 6e 20 65 |r{datum}| is an e|
|00002e10| 78 74 65 72 6e 61 6c 20 | 72 65 70 72 65 73 65 6e |xternal |represen|
|00002e20| 74 61 74 69 6f 6e 20 6f | 66 20 73 6f 6d 65 20 6f |tation o|f some o|
|00002e30| 62 6a 65 63 74 2e 0a 41 | 6c 6c 20 74 68 65 20 5c |bject..A|ll the \|
|00002e40| 68 79 70 65 72 7b 64 61 | 74 75 6d 7d 73 20 6d 75 |hyper{da|tum}s mu|
|00002e50| 73 74 20 62 65 20 64 69 | 73 74 69 6e 63 74 2e 0a |st be di|stinct..|
|00002e60| 54 68 65 20 6c 61 73 74 | 20 5c 68 79 70 65 72 7b |The last| \hyper{|
|00002e70| 63 6c 61 75 73 65 7d 20 | 6d 61 79 20 62 65 20 61 |clause} |may be a|
|00002e80| 6e 20 60 60 65 6c 73 65 | 20 63 6c 61 75 73 65 2c |n ``else| clause,|
|00002e90| 27 27 20 77 68 69 63 68 | 20 68 61 73 20 74 68 65 |'' which| has the|
|00002ea0| 20 66 6f 72 6d 0a 5c 62 | 65 67 69 6e 7b 73 63 68 | form.\b|egin{sch|
|00002eb0| 65 6d 65 7d 0a 28 65 6c | 73 65 20 5c 68 79 70 65 |eme}.(el|se \hype|
|00002ec0| 72 69 7b 65 78 70 72 65 | 73 73 69 6f 6e 7d 20 5c |ri{expre|ssion} \|
|00002ed0| 68 79 70 65 72 69 69 7b | 65 78 70 72 65 73 73 69 |hyperii{|expressi|
|00002ee0| 6f 6e 7d 20 5c 64 6f 74 | 73 66 6f 6f 29 5c 72 6d |on} \dot|sfoo)\rm|
|00002ef0| 2e 25 0a 5c 65 6e 64 7b | 73 63 68 65 6d 65 7d 0a |.%.\end{|scheme}.|
|00002f00| 5c 73 63 68 69 6e 64 65 | 78 7b 65 6c 73 65 7d 0a |\schinde|x{else}.|
|00002f10| 0a 5c 73 65 6d 61 6e 74 | 69 63 73 0a 41 20 5c 69 |.\semant|ics.A \i|
|00002f20| 64 65 7b 63 61 73 65 7d | 20 65 78 70 72 65 73 73 |de{case}| express|
|00002f30| 69 6f 6e 20 69 73 20 65 | 76 61 6c 75 61 74 65 64 |ion is e|valuated|
|00002f40| 20 61 73 20 66 6f 6c 6c | 6f 77 73 2e 20 20 5c 68 | as foll|ows. \h|
|00002f50| 79 70 65 72 7b 4b 65 79 | 7d 20 69 73 0a 65 76 61 |yper{Key|} is.eva|
|00002f60| 6c 75 61 74 65 64 20 61 | 6e 64 20 69 74 73 20 72 |luated a|nd its r|
|00002f70| 65 73 75 6c 74 20 69 73 | 20 63 6f 6d 70 61 72 65 |esult is| compare|
|00002f80| 64 20 61 67 61 69 6e 73 | 74 20 65 61 63 68 20 5c |d agains|t each \|
|00002f90| 68 79 70 65 72 7b 64 61 | 74 75 6d 7d 2e 20 20 49 |hyper{da|tum}. I|
|00002fa0| 66 20 74 68 65 0a 72 65 | 73 75 6c 74 20 6f 66 20 |f the.re|sult of |
|00002fb0| 65 76 61 6c 75 61 74 69 | 6e 67 20 5c 68 79 70 65 |evaluati|ng \hype|
|00002fc0| 72 7b 6b 65 79 7d 20 69 | 73 20 65 71 75 69 76 61 |r{key} i|s equiva|
|00002fd0| 6c 65 6e 74 20 28 69 6e | 20 74 68 65 20 73 65 6e |lent (in| the sen|
|00002fe0| 73 65 20 6f 66 0a 5c 69 | 64 65 7b 65 71 76 3f 7d |se of.\i|de{eqv?}|
|00002ff0| 3b 20 73 65 65 20 73 65 | 63 74 69 6f 6e 7e 5c 72 |; see se|ction~\r|
|00003000| 65 66 7b 65 71 76 3f 7d | 29 20 74 6f 20 61 20 5c |ef{eqv?}|) to a \|
|00003010| 68 79 70 65 72 7b 64 61 | 74 75 6d 7d 2c 20 74 68 |hyper{da|tum}, th|
|00003020| 65 6e 20 74 68 65 0a 65 | 78 70 72 65 73 73 69 6f |en the.e|xpressio|
|00003030| 6e 73 20 69 6e 20 74 68 | 65 20 63 6f 72 72 65 73 |ns in th|e corres|
|00003040| 70 6f 6e 64 69 6e 67 20 | 5c 68 79 70 65 72 7b 63 |ponding |\hyper{c|
|00003050| 6c 61 75 73 65 7d 20 61 | 72 65 20 65 76 61 6c 75 |lause} a|re evalu|
|00003060| 61 74 65 64 20 66 72 6f | 6d 20 6c 65 66 74 0a 74 |ated fro|m left.t|
|00003070| 6f 20 72 69 67 68 74 20 | 61 6e 64 20 74 68 65 20 |o right |and the |
|00003080| 72 65 73 75 6c 74 20 6f | 66 20 74 68 65 20 6c 61 |result o|f the la|
|00003090| 73 74 20 65 78 70 72 65 | 73 73 69 6f 6e 20 69 6e |st expre|ssion in|
|000030a0| 20 74 68 65 20 5c 68 79 | 70 65 72 7b 63 6c 61 75 | the \hy|per{clau|
|000030b0| 73 65 7d 20 69 73 0a 72 | 65 74 75 72 6e 65 64 20 |se} is.r|eturned |
|000030c0| 61 73 20 74 68 65 20 72 | 65 73 75 6c 74 20 6f 66 |as the r|esult of|
|000030d0| 20 74 68 65 20 5c 69 64 | 65 7b 63 61 73 65 7d 20 | the \id|e{case} |
|000030e0| 65 78 70 72 65 73 73 69 | 6f 6e 2e 20 20 49 66 20 |expressi|on. If |
|000030f0| 74 68 65 20 72 65 73 75 | 6c 74 20 6f 66 0a 65 76 |the resu|lt of.ev|
|00003100| 61 6c 75 61 74 69 6e 67 | 20 5c 68 79 70 65 72 7b |aluating| \hyper{|
|00003110| 6b 65 79 7d 20 69 73 20 | 64 69 66 66 65 72 65 6e |key} is |differen|
|00003120| 74 20 66 72 6f 6d 20 65 | 76 65 72 79 20 5c 68 79 |t from e|very \hy|
|00003130| 70 65 72 7b 64 61 74 75 | 6d 7d 2c 20 74 68 65 6e |per{datu|m}, then|
|00003140| 20 69 66 0a 74 68 65 72 | 65 20 69 73 20 61 6e 20 | if.ther|e is an |
|00003150| 65 6c 73 65 20 63 6c 61 | 75 73 65 20 69 74 73 20 |else cla|use its |
|00003160| 65 78 70 72 65 73 73 69 | 6f 6e 73 20 61 72 65 20 |expressi|ons are |
|00003170| 65 76 61 6c 75 61 74 65 | 64 20 61 6e 64 20 74 68 |evaluate|d and th|
|00003180| 65 0a 72 65 73 75 6c 74 | 20 6f 66 20 74 68 65 20 |e.result| of the |
|00003190| 6c 61 73 74 20 69 73 20 | 74 68 65 20 72 65 73 75 |last is |the resu|
|000031a0| 6c 74 20 6f 66 20 74 68 | 65 20 5c 69 64 65 7b 63 |lt of th|e \ide{c|
|000031b0| 61 73 65 7d 20 65 78 70 | 72 65 73 73 69 6f 6e 3b |ase} exp|ression;|
|000031c0| 20 6f 74 68 65 72 77 69 | 73 65 0a 74 68 65 20 72 | otherwi|se.the r|
|000031d0| 65 73 75 6c 74 20 6f 66 | 20 74 68 65 20 5c 69 64 |esult of| the \id|
|000031e0| 65 7b 63 61 73 65 7d 20 | 65 78 70 72 65 73 73 69 |e{case} |expressi|
|000031f0| 6f 6e 20 69 73 20 75 6e | 73 70 65 63 69 66 69 65 |on is un|specifie|
|00003200| 64 2e 0a 0a 5c 62 65 67 | 69 6e 7b 73 63 68 65 6d |d...\beg|in{schem|
|00003210| 65 7d 0a 28 63 61 73 65 | 20 28 2a 20 32 20 33 29 |e}.(case| (* 2 3)|
|00003220| 0a 20 20 28 28 32 20 33 | 20 35 20 37 29 20 27 70 |. ((2 3| 5 7) 'p|
|00003230| 72 69 6d 65 29 0a 20 20 | 28 28 31 20 34 20 36 20 |rime). |((1 4 6 |
|00003240| 38 20 39 29 20 27 63 6f | 6d 70 6f 73 69 74 65 29 |8 9) 'co|mposite)|
|00003250| 29 20 20 20 20 20 5c 65 | 76 20 20 63 6f 6d 70 6f |) \e|v compo|
|00003260| 73 69 74 65 0a 28 63 61 | 73 65 20 28 63 61 72 20 |site.(ca|se (car |
|00003270| 27 28 63 20 64 29 29 0a | 20 20 28 28 61 29 20 27 |'(c d)).| ((a) '|
|00003280| 61 29 0a 20 20 28 28 62 | 29 20 27 62 29 29 20 20 |a). ((b|) 'b)) |
|00003290| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000032a0| 20 20 20 5c 65 76 20 20 | 5c 75 6e 73 70 65 63 69 | \ev |\unspeci|
|000032b0| 66 69 65 64 0a 28 63 61 | 73 65 20 28 63 61 72 20 |fied.(ca|se (car |
|000032c0| 27 28 63 20 64 29 29 0a | 20 20 28 28 61 20 65 20 |'(c d)).| ((a e |
|000032d0| 69 20 6f 20 75 29 20 27 | 76 6f 77 65 6c 29 0a 20 |i o u) '|vowel). |
|000032e0| 20 28 28 77 20 79 29 20 | 27 73 65 6d 69 76 6f 77 | ((w y) |'semivow|
|000032f0| 65 6c 29 0a 20 20 28 65 | 6c 73 65 20 27 63 6f 6e |el). (e|lse 'con|
|00003300| 73 6f 6e 61 6e 74 29 29 | 20 20 20 20 20 20 20 20 |sonant))| |
|00003310| 20 20 20 20 5c 65 76 20 | 20 63 6f 6e 73 6f 6e 61 | \ev | consona|
|00003320| 6e 74 25 0a 5c 65 6e 64 | 7b 73 63 68 65 6d 65 7d |nt%.\end|{scheme}|
|00003330| 0a 0a 5c 65 6e 64 7b 65 | 6e 74 72 79 7d 0a 0a 0a |..\end{e|ntry}...|
|00003340| 5c 62 65 67 69 6e 7b 65 | 6e 74 72 79 7d 7b 25 0a |\begin{e|ntry}{%.|
|00003350| 5c 70 72 6f 74 6f 7b 61 | 6e 64 7d 7b 20 5c 68 79 |\proto{a|nd}{ \hy|
|00003360| 70 65 72 69 7b 74 65 73 | 74 7d 20 5c 64 6f 74 73 |peri{tes|t} \dots|
|00003370| 66 6f 6f 7d 7b 65 73 73 | 65 6e 74 69 61 6c 20 5c |foo}{ess|ential \|
|00003380| 65 78 70 72 74 79 70 65 | 7d 7d 0a 0a 54 68 65 20 |exprtype|}}..The |
|00003390| 5c 68 79 70 65 72 7b 74 | 65 73 74 7d 20 65 78 70 |\hyper{t|est} exp|
|000033a0| 72 65 73 73 69 6f 6e 73 | 20 61 72 65 20 65 76 61 |ressions| are eva|
|000033b0| 6c 75 61 74 65 64 20 66 | 72 6f 6d 20 6c 65 66 74 |luated f|rom left|
|000033c0| 20 74 6f 20 72 69 67 68 | 74 2c 20 61 6e 64 20 74 | to righ|t, and t|
|000033d0| 68 65 0a 76 61 6c 75 65 | 20 6f 66 20 74 68 65 20 |he.value| of the |
|000033e0| 66 69 72 73 74 20 65 78 | 70 72 65 73 73 69 6f 6e |first ex|pression|
|000033f0| 20 74 68 61 74 20 65 76 | 61 6c 75 61 74 65 73 20 | that ev|aluates |
|00003400| 74 6f 20 61 20 66 61 6c | 73 65 20 76 61 6c 75 65 |to a fal|se value|
|00003410| 20 28 73 65 65 0a 73 65 | 63 74 69 6f 6e 7e 5c 72 | (see.se|ction~\r|
|00003420| 65 66 7b 62 6f 6f 6c 65 | 61 6e 73 65 63 74 69 6f |ef{boole|ansectio|
|00003430| 6e 7d 29 20 69 73 20 72 | 65 74 75 72 6e 65 64 2e |n}) is r|eturned.|
|00003440| 20 20 41 6e 79 20 72 65 | 6d 61 69 6e 69 6e 67 20 | Any re|maining |
|00003450| 65 78 70 72 65 73 73 69 | 6f 6e 73 0a 61 72 65 20 |expressi|ons.are |
|00003460| 6e 6f 74 20 65 76 61 6c | 75 61 74 65 64 2e 20 20 |not eval|uated. |
|00003470| 49 66 20 61 6c 6c 20 74 | 68 65 20 65 78 70 72 65 |If all t|he expre|
|00003480| 73 73 69 6f 6e 73 20 65 | 76 61 6c 75 61 74 65 20 |ssions e|valuate |
|00003490| 74 6f 20 74 72 75 65 20 | 76 61 6c 75 65 73 2c 20 |to true |values, |
|000034a0| 74 68 65 0a 76 61 6c 75 | 65 20 6f 66 20 74 68 65 |the.valu|e of the|
|000034b0| 20 6c 61 73 74 20 65 78 | 70 72 65 73 73 69 6f 6e | last ex|pression|
|000034c0| 20 69 73 20 72 65 74 75 | 72 6e 65 64 2e 20 20 49 | is retu|rned. I|
|000034d0| 66 20 74 68 65 72 65 20 | 61 72 65 20 6e 6f 20 65 |f there |are no e|
|000034e0| 78 70 72 65 73 73 69 6f | 6e 73 0a 74 68 65 6e 20 |xpressio|ns.then |
|000034f0| 5c 73 63 68 74 72 75 65 | 7b 7d 20 69 73 20 72 65 |\schtrue|{} is re|
|00003500| 74 75 72 6e 65 64 2e 0a | 0a 5c 62 65 67 69 6e 7b |turned..|.\begin{|
|00003510| 73 63 68 65 6d 65 7d 0a | 28 61 6e 64 20 28 3d 20 |scheme}.|(and (= |
|00003520| 32 20 32 29 20 28 3e 20 | 32 20 31 29 29 20 20 20 |2 2) (> |2 1)) |
|00003530| 20 20 20 20 20 20 20 20 | 5c 65 76 20 20 5c 73 63 | |\ev \sc|
|00003540| 68 74 72 75 65 0a 28 61 | 6e 64 20 28 3d 20 32 20 |htrue.(a|nd (= 2 |
|00003550| 32 29 20 28 3c 20 32 20 | 31 29 29 20 20 20 20 20 |2) (< 2 |1)) |
|00003560| 20 20 20 20 20 20 5c 65 | 76 20 20 5c 73 63 68 66 | \e|v \schf|
|00003570| 61 6c 73 65 0a 28 61 6e | 64 20 31 20 32 20 27 63 |alse.(an|d 1 2 'c|
|00003580| 20 27 28 66 20 67 29 29 | 20 20 20 20 20 20 20 20 | '(f g))| |
|00003590| 20 20 20 20 20 5c 65 76 | 20 20 28 66 20 67 29 0a | \ev| (f g).|
|000035a0| 28 61 6e 64 29 20 20 20 | 20 20 20 20 20 20 20 20 |(and) | |
|000035b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000035c0| 5c 65 76 20 20 5c 73 63 | 68 74 72 75 65 25 0a 5c |\ev \sc|htrue%.\|
|000035d0| 65 6e 64 7b 73 63 68 65 | 6d 65 7d 0a 0a 5c 65 6e |end{sche|me}..\en|
|000035e0| 64 7b 65 6e 74 72 79 7d | 0a 0a 0a 5c 62 65 67 69 |d{entry}|...\begi|
|000035f0| 6e 7b 65 6e 74 72 79 7d | 7b 25 0a 5c 70 72 6f 74 |n{entry}|{%.\prot|
|00003600| 6f 7b 6f 72 7d 7b 20 5c | 68 79 70 65 72 69 7b 74 |o{or}{ \|hyperi{t|
|00003610| 65 73 74 7d 20 5c 64 6f | 74 73 66 6f 6f 7d 7b 65 |est} \do|tsfoo}{e|
|00003620| 73 73 65 6e 74 69 61 6c | 20 5c 65 78 70 72 74 79 |ssential| \exprty|
|00003630| 70 65 7d 7d 0a 0a 54 68 | 65 20 5c 68 79 70 65 72 |pe}}..Th|e \hyper|
|00003640| 7b 74 65 73 74 7d 20 65 | 78 70 72 65 73 73 69 6f |{test} e|xpressio|
|00003650| 6e 73 20 61 72 65 20 65 | 76 61 6c 75 61 74 65 64 |ns are e|valuated|
|00003660| 20 66 72 6f 6d 20 6c 65 | 66 74 20 74 6f 20 72 69 | from le|ft to ri|
|00003670| 67 68 74 2c 20 61 6e 64 | 20 74 68 65 20 76 61 6c |ght, and| the val|
|00003680| 75 65 20 6f 66 20 74 68 | 65 0a 66 69 72 73 74 20 |ue of th|e.first |
|00003690| 65 78 70 72 65 73 73 69 | 6f 6e 20 74 68 61 74 20 |expressi|on that |
|000036a0| 65 76 61 6c 75 61 74 65 | 73 20 74 6f 20 61 20 74 |evaluate|s to a t|
|000036b0| 72 75 65 20 76 61 6c 75 | 65 20 28 73 65 65 0a 73 |rue valu|e (see.s|
|000036c0| 65 63 74 69 6f 6e 7e 5c | 72 65 66 7b 62 6f 6f 6c |ection~\|ref{bool|
|000036d0| 65 61 6e 73 65 63 74 69 | 6f 6e 7d 29 20 69 73 20 |eansecti|on}) is |
|000036e0| 72 65 74 75 72 6e 65 64 | 2e 20 20 41 6e 79 20 72 |returned|. Any r|
|000036f0| 65 6d 61 69 6e 69 6e 67 | 20 65 78 70 72 65 73 73 |emaining| express|
|00003700| 69 6f 6e 73 0a 61 72 65 | 20 6e 6f 74 20 65 76 61 |ions.are| not eva|
|00003710| 6c 75 61 74 65 64 2e 20 | 20 49 66 20 61 6c 6c 20 |luated. | If all |
|00003720| 65 78 70 72 65 73 73 69 | 6f 6e 73 20 65 76 61 6c |expressi|ons eval|
|00003730| 75 61 74 65 20 74 6f 20 | 66 61 6c 73 65 20 76 61 |uate to |false va|
|00003740| 6c 75 65 73 2c 20 74 68 | 65 0a 76 61 6c 75 65 20 |lues, th|e.value |
|00003750| 6f 66 20 74 68 65 20 6c | 61 73 74 20 65 78 70 72 |of the l|ast expr|
|00003760| 65 73 73 69 6f 6e 20 69 | 73 20 72 65 74 75 72 6e |ession i|s return|
|00003770| 65 64 2e 20 20 49 66 20 | 74 68 65 72 65 20 61 72 |ed. If |there ar|
|00003780| 65 20 6e 6f 0a 65 78 70 | 72 65 73 73 69 6f 6e 73 |e no.exp|ressions|
|00003790| 20 74 68 65 6e 20 5c 73 | 63 68 66 61 6c 73 65 7b | then \s|chfalse{|
|000037a0| 7d 20 69 73 20 72 65 74 | 75 72 6e 65 64 2e 0a 0a |} is ret|urned...|
|000037b0| 5c 62 65 67 69 6e 7b 73 | 63 68 65 6d 65 7d 0a 28 |\begin{s|cheme}.(|
|000037c0| 6f 72 20 28 3d 20 32 20 | 32 29 20 28 3e 20 32 20 |or (= 2 |2) (> 2 |
|000037d0| 31 29 29 20 20 20 20 20 | 20 20 20 20 20 20 20 5c |1)) | \|
|000037e0| 65 76 20 20 5c 73 63 68 | 74 72 75 65 0a 28 6f 72 |ev \sch|true.(or|
|000037f0| 20 28 3d 20 32 20 32 29 | 20 28 3c 20 32 20 31 29 | (= 2 2)| (< 2 1)|
|00003800| 29 20 20 20 20 20 20 20 | 20 20 20 20 20 5c 65 76 |) | \ev|
|00003810| 20 20 5c 73 63 68 74 72 | 75 65 0a 28 6f 72 20 5c | \schtr|ue.(or \|
|00003820| 73 63 68 66 61 6c 73 65 | 20 5c 73 63 68 66 61 6c |schfalse| \schfal|
|00003830| 73 65 20 5c 73 63 68 66 | 61 6c 73 65 29 20 5c 65 |se \schf|alse) \e|
|00003840| 76 20 20 5c 73 63 68 66 | 61 6c 73 65 0a 28 6f 72 |v \schf|alse.(or|
|00003850| 20 28 6d 65 6d 71 20 27 | 62 20 27 28 61 20 62 20 | (memq '|b '(a b |
|00003860| 63 29 29 20 0a 20 20 20 | 20 28 2f 20 33 20 30 29 |c)) . | (/ 3 0)|
|00003870| 29 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |) | |
|00003880| 20 20 20 20 20 5c 65 76 | 20 20 28 62 20 63 29 25 | \ev| (b c)%|
|00003890| 0a 5c 65 6e 64 7b 73 63 | 68 65 6d 65 7d 0a 0a 5c |.\end{sc|heme}..\|
|000038a0| 65 6e 64 7b 65 6e 74 72 | 79 7d 0a 0a 0a 5c 73 75 |end{entr|y}...\su|
|000038b0| 62 73 65 63 74 69 6f 6e | 7b 42 69 6e 64 69 6e 67 |bsection|{Binding|
|000038c0| 20 63 6f 6e 73 74 72 75 | 63 74 73 7d 0a 0a 54 68 | constru|cts}..Th|
|000038d0| 65 20 74 68 72 65 65 20 | 62 69 6e 64 69 6e 67 20 |e three |binding |
|000038e0| 63 6f 6e 73 74 72 75 63 | 74 73 20 5c 69 64 65 7b |construc|ts \ide{|
|000038f0| 6c 65 74 7d 2c 20 5c 69 | 64 65 7b 6c 65 74 2a 7d |let}, \i|de{let*}|
|00003900| 2c 20 61 6e 64 20 5c 69 | 64 65 7b 6c 65 74 72 65 |, and \i|de{letre|
|00003910| 63 7d 0a 67 69 76 65 20 | 53 63 68 65 6d 65 20 61 |c}.give |Scheme a|
|00003920| 20 62 6c 6f 63 6b 20 73 | 74 72 75 63 74 75 72 65 | block s|tructure|
|00003930| 2c 20 6c 69 6b 65 20 41 | 6c 67 6f 6c 20 36 30 2e |, like A|lgol 60.|
|00003940| 20 20 54 68 65 20 73 79 | 6e 74 61 78 20 6f 66 20 | The sy|ntax of |
|00003950| 74 68 65 20 74 68 72 65 | 65 0a 63 6f 6e 73 74 72 |the thre|e.constr|
|00003960| 75 63 74 73 20 69 73 20 | 69 64 65 6e 74 69 63 61 |ucts is |identica|
|00003970| 6c 2c 20 62 75 74 20 74 | 68 65 79 20 64 69 66 66 |l, but t|hey diff|
|00003980| 65 72 20 69 6e 20 74 68 | 65 20 72 65 67 69 6f 6e |er in th|e region|
|00003990| 73 5c 69 6e 64 65 78 7b | 72 65 67 69 6f 6e 7d 20 |s\index{|region} |
|000039a0| 74 68 65 79 20 65 73 74 | 61 62 6c 69 73 68 0a 66 |they est|ablish.f|
|000039b0| 6f 72 20 74 68 65 69 72 | 20 76 61 72 69 61 62 6c |or their| variabl|
|000039c0| 65 20 62 69 6e 64 69 6e | 67 73 2e 20 20 49 6e 20 |e bindin|gs. In |
|000039d0| 61 20 5c 69 64 65 7b 6c | 65 74 7d 20 65 78 70 72 |a \ide{l|et} expr|
|000039e0| 65 73 73 69 6f 6e 2c 20 | 74 68 65 20 69 6e 69 74 |ession, |the init|
|000039f0| 69 61 6c 0a 76 61 6c 75 | 65 73 20 61 72 65 20 63 |ial.valu|es are c|
|00003a00| 6f 6d 70 75 74 65 64 20 | 62 65 66 6f 72 65 20 61 |omputed |before a|
|00003a10| 6e 79 20 6f 66 20 74 68 | 65 20 76 61 72 69 61 62 |ny of th|e variab|
|00003a20| 6c 65 73 20 62 65 63 6f | 6d 65 20 62 6f 75 6e 64 |les beco|me bound|
|00003a30| 3b 20 69 6e 20 61 0a 5c | 69 64 65 7b 6c 65 74 2a |; in a.\|ide{let*|
|00003a40| 7d 20 65 78 70 72 65 73 | 73 69 6f 6e 2c 20 74 68 |} expres|sion, th|
|00003a50| 65 20 62 69 6e 64 69 6e | 67 73 20 61 6e 64 20 65 |e bindin|gs and e|
|00003a60| 76 61 6c 75 61 74 69 6f | 6e 73 20 61 72 65 20 70 |valuatio|ns are p|
|00003a70| 65 72 66 6f 72 6d 65 64 | 0a 73 65 71 75 65 6e 74 |erformed|.sequent|
|00003a80| 69 61 6c 6c 79 3b 20 77 | 68 69 6c 65 20 69 6e 20 |ially; w|hile in |
|00003a90| 61 20 5c 69 64 65 7b 6c | 65 74 72 65 63 7d 20 65 |a \ide{l|etrec} e|
|00003aa0| 78 70 72 65 73 73 69 6f | 6e 2c 20 61 6c 6c 20 74 |xpressio|n, all t|
|00003ab0| 68 65 20 62 69 6e 64 69 | 6e 67 73 20 61 72 65 20 |he bindi|ngs are |
|00003ac0| 69 6e 0a 65 66 66 65 63 | 74 20 77 68 69 6c 65 20 |in.effec|t while |
|00003ad0| 74 68 65 69 72 20 69 6e | 69 74 69 61 6c 20 76 61 |their in|itial va|
|00003ae0| 6c 75 65 73 20 61 72 65 | 20 62 65 69 6e 67 20 63 |lues are| being c|
|00003af0| 6f 6d 70 75 74 65 64 2c | 20 74 68 75 73 20 61 6c |omputed,| thus al|
|00003b00| 6c 6f 77 69 6e 67 0a 6d | 75 74 75 61 6c 6c 79 20 |lowing.m|utually |
|00003b10| 72 65 63 75 72 73 69 76 | 65 20 64 65 66 69 6e 69 |recursiv|e defini|
|00003b20| 74 69 6f 6e 73 2e 0a 0a | 5c 62 65 67 69 6e 7b 65 |tions...|\begin{e|
|00003b30| 6e 74 72 79 7d 7b 25 0a | 5c 70 72 6f 74 6f 7b 6c |ntry}{%.|\proto{l|
|00003b40| 65 74 7d 7b 20 5c 68 79 | 70 65 72 7b 62 69 6e 64 |et}{ \hy|per{bind|
|00003b50| 69 6e 67 73 7d 20 5c 68 | 79 70 65 72 7b 62 6f 64 |ings} \h|yper{bod|
|00003b60| 79 7d 7d 7b 65 73 73 65 | 6e 74 69 61 6c 20 5c 65 |y}}{esse|ntial \e|
|00003b70| 78 70 72 74 79 70 65 7d | 7d 0a 0a 5c 73 79 6e 74 |xprtype}|}..\synt|
|00003b80| 61 78 0a 5c 68 79 70 65 | 72 7b 42 69 6e 64 69 6e |ax.\hype|r{Bindin|
|00003b90| 67 73 7d 20 73 68 6f 75 | 6c 64 20 68 61 76 65 20 |gs} shou|ld have |
|00003ba0| 74 68 65 20 66 6f 72 6d | 0a 5c 62 65 67 69 6e 7b |the form|.\begin{|
|00003bb0| 73 63 68 65 6d 65 7d 0a | 28 28 5c 68 79 70 65 72 |scheme}.|((\hyper|
|00003bc0| 69 7b 76 61 72 69 61 62 | 6c 65 7d 20 5c 68 79 70 |i{variab|le} \hyp|
|00003bd0| 65 72 69 7b 69 6e 69 74 | 7d 29 20 5c 64 6f 74 73 |eri{init|}) \dots|
|00003be0| 66 6f 6f 29 5c 72 6d 2c | 25 0a 5c 65 6e 64 7b 73 |foo)\rm,|%.\end{s|
|00003bf0| 63 68 65 6d 65 7d 0a 77 | 68 65 72 65 20 65 61 63 |cheme}.w|here eac|
|00003c00| 68 20 5c 68 79 70 65 72 | 7b 69 6e 69 74 7d 20 69 |h \hyper|{init} i|
|00003c10| 73 20 61 6e 20 65 78 70 | 72 65 73 73 69 6f 6e 2c |s an exp|ression,|
|00003c20| 20 61 6e 64 20 5c 68 79 | 70 65 72 7b 62 6f 64 79 | and \hy|per{body|
|00003c30| 7d 20 73 68 6f 75 6c 64 | 20 62 65 20 61 0a 73 65 |} should| be a.se|
|00003c40| 71 75 65 6e 63 65 20 6f | 66 20 6f 6e 65 20 6f 72 |quence o|f one or|
|00003c50| 20 6d 6f 72 65 20 65 78 | 70 72 65 73 73 69 6f 6e | more ex|pression|
|00003c60| 73 2e 20 20 49 74 20 69 | 73 0a 61 6e 20 65 72 72 |s. It i|s.an err|
|00003c70| 6f 72 20 66 6f 72 20 61 | 20 5c 68 79 70 65 72 7b |or for a| \hyper{|
|00003c80| 76 61 72 69 61 62 6c 65 | 7d 20 74 6f 20 61 70 70 |variable|} to app|
|00003c90| 65 61 72 20 6d 6f 72 65 | 20 74 68 61 6e 20 6f 6e |ear more| than on|
|00003ca0| 63 65 20 69 6e 20 74 68 | 65 20 6c 69 73 74 20 6f |ce in th|e list o|
|00003cb0| 66 20 76 61 72 69 61 62 | 6c 65 73 0a 62 65 69 6e |f variab|les.bein|
|00003cc0| 67 20 62 6f 75 6e 64 2e | 0a 0a 5c 73 65 6d 61 6e |g bound.|..\seman|
|00003cd0| 74 69 63 73 0a 54 68 65 | 20 5c 68 79 70 65 72 7b |tics.The| \hyper{|
|00003ce0| 69 6e 69 74 7d 73 20 61 | 72 65 20 65 76 61 6c 75 |init}s a|re evalu|
|00003cf0| 61 74 65 64 20 69 6e 20 | 74 68 65 20 63 75 72 72 |ated in |the curr|
|00003d00| 65 6e 74 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 20 |ent envi|ronment |
|00003d10| 28 69 6e 20 73 6f 6d 65 | 0a 75 6e 73 70 65 63 69 |(in some|.unspeci|
|00003d20| 66 69 65 64 20 6f 72 64 | 65 72 29 2c 20 74 68 65 |fied ord|er), the|
|00003d30| 20 5c 68 79 70 65 72 7b | 76 61 72 69 61 62 6c 65 | \hyper{|variable|
|00003d40| 7d 73 20 61 72 65 20 62 | 6f 75 6e 64 20 74 6f 20 |}s are b|ound to |
|00003d50| 66 72 65 73 68 20 6c 6f | 63 61 74 69 6f 6e 73 0a |fresh lo|cations.|
|00003d60| 68 6f 6c 64 69 6e 67 20 | 74 68 65 20 72 65 73 75 |holding |the resu|
|00003d70| 6c 74 73 2c 20 74 68 65 | 20 5c 68 79 70 65 72 7b |lts, the| \hyper{|
|00003d80| 62 6f 64 79 7d 20 69 73 | 20 65 76 61 6c 75 61 74 |body} is| evaluat|
|00003d90| 65 64 20 69 6e 20 74 68 | 65 20 65 78 74 65 6e 64 |ed in th|e extend|
|00003da0| 65 64 0a 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 2c 20 |ed.envir|onment, |
|00003db0| 61 6e 64 20 74 68 65 20 | 76 61 6c 75 65 20 6f 66 |and the |value of|
|00003dc0| 20 74 68 65 20 6c 61 73 | 74 20 65 78 70 72 65 73 | the las|t expres|
|00003dd0| 73 69 6f 6e 20 6f 66 20 | 5c 68 79 70 65 72 7b 62 |sion of |\hyper{b|
|00003de0| 6f 64 79 7d 20 69 73 0a | 72 65 74 75 72 6e 65 64 |ody} is.|returned|
|00003df0| 2e 20 20 45 61 63 68 20 | 62 69 6e 64 69 6e 67 20 |. Each |binding |
|00003e00| 6f 66 20 61 20 5c 68 79 | 70 65 72 7b 76 61 72 69 |of a \hy|per{vari|
|00003e10| 61 62 6c 65 7d 20 68 61 | 73 20 5c 68 79 70 65 72 |able} ha|s \hyper|
|00003e20| 7b 62 6f 64 79 7d 20 61 | 73 20 69 74 73 0a 72 65 |{body} a|s its.re|
|00003e30| 67 69 6f 6e 2e 5c 69 6e | 64 65 78 7b 72 65 67 69 |gion.\in|dex{regi|
|00003e40| 6f 6e 7d 0a 0a 5c 62 65 | 67 69 6e 7b 73 63 68 65 |on}..\be|gin{sche|
|00003e50| 6d 65 7d 0a 28 6c 65 74 | 20 28 28 78 20 32 29 20 |me}.(let| ((x 2) |
|00003e60| 28 79 20 33 29 29 0a 20 | 20 28 2a 20 78 20 79 29 |(y 3)). | (* x y)|
|00003e70| 29 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |) | |
|00003e80| 20 20 20 20 20 20 20 5c | 65 76 20 20 36 0a 0a 28 | \|ev 6..(|
|00003e90| 6c 65 74 20 28 28 78 20 | 32 29 20 28 79 20 33 29 |let ((x |2) (y 3)|
|00003ea0| 29 0a 20 20 28 6c 65 74 | 20 28 28 78 20 37 29 0a |). (let| ((x 7).|
|00003eb0| 20 20 20 20 20 20 20 20 | 28 7a 20 28 2b 20 78 20 | |(z (+ x |
|00003ec0| 79 29 29 29 0a 20 20 20 | 20 28 2a 20 7a 20 78 29 |y))). | (* z x)|
|00003ed0| 29 29 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |)) | |
|00003ee0| 20 20 20 20 20 5c 65 76 | 20 20 33 35 25 0a 5c 65 | \ev| 35%.\e|
|00003ef0| 6e 64 7b 73 63 68 65 6d | 65 7d 0a 0a 53 65 65 20 |nd{schem|e}..See |
|00003f00| 61 6c 73 6f 20 6e 61 6d | 65 64 20 5c 69 64 65 7b |also nam|ed \ide{|
|00003f10| 6c 65 74 7d 2c 20 73 65 | 63 74 69 6f 6e 20 5c 72 |let}, se|ction \r|
|00003f20| 65 66 7b 6e 61 6d 65 64 | 6c 65 74 7d 2e 0a 0a 5c |ef{named|let}...\|
|00003f30| 65 6e 64 7b 65 6e 74 72 | 79 7d 0a 0a 0a 5c 62 65 |end{entr|y}...\be|
|00003f40| 67 69 6e 7b 65 6e 74 72 | 79 7d 7b 25 0a 5c 70 72 |gin{entr|y}{%.\pr|
|00003f50| 6f 74 6f 7b 6c 65 74 2a | 7d 7b 20 5c 68 79 70 65 |oto{let*|}{ \hype|
|00003f60| 72 7b 62 69 6e 64 69 6e | 67 73 7d 20 5c 68 79 70 |r{bindin|gs} \hyp|
|00003f70| 65 72 7b 62 6f 64 79 7d | 7d 7b 5c 65 78 70 72 74 |er{body}|}{\exprt|
|00003f80| 79 70 65 7d 7d 5c 6e 6f | 62 72 65 61 6b 0a 0a 5c |ype}}\no|break..\|
|00003f90| 6e 6f 62 72 65 61 6b 0a | 5c 73 79 6e 74 61 78 0a |nobreak.|\syntax.|
|00003fa0| 5c 68 79 70 65 72 7b 42 | 69 6e 64 69 6e 67 73 7d |\hyper{B|indings}|
|00003fb0| 20 73 68 6f 75 6c 64 20 | 68 61 76 65 20 74 68 65 | should |have the|
|00003fc0| 20 66 6f 72 6d 0a 5c 62 | 65 67 69 6e 7b 73 63 68 | form.\b|egin{sch|
|00003fd0| 65 6d 65 7d 0a 28 28 5c | 68 79 70 65 72 69 7b 76 |eme}.((\|hyperi{v|
|00003fe0| 61 72 69 61 62 6c 65 7d | 20 5c 68 79 70 65 72 69 |ariable}| \hyperi|
|00003ff0| 7b 69 6e 69 74 7d 29 20 | 5c 64 6f 74 73 66 6f 6f |{init}) |\dotsfoo|
|00004000| 29 5c 72 6d 2c 25 0a 5c | 65 6e 64 7b 73 63 68 65 |)\rm,%.\|end{sche|
|00004010| 6d 65 7d 0a 61 6e 64 20 | 5c 68 79 70 65 72 7b 62 |me}.and |\hyper{b|
|00004020| 6f 64 79 7d 20 73 68 6f | 75 6c 64 20 62 65 20 61 |ody} sho|uld be a|
|00004030| 20 73 65 71 75 65 6e 63 | 65 20 6f 66 0a 6f 6e 65 | sequenc|e of.one|
|00004040| 20 6f 72 20 6d 6f 72 65 | 20 65 78 70 72 65 73 73 | or more| express|
|00004050| 69 6f 6e 73 2e 0a 0a 5c | 73 65 6d 61 6e 74 69 63 |ions...\|semantic|
|00004060| 73 0a 5c 69 64 65 7b 4c | 65 74 2a 7d 20 69 73 20 |s.\ide{L|et*} is |
|00004070| 73 69 6d 69 6c 61 72 20 | 74 6f 20 5c 69 64 65 7b |similar |to \ide{|
|00004080| 6c 65 74 7d 2c 20 62 75 | 74 20 74 68 65 20 62 69 |let}, bu|t the bi|
|00004090| 6e 64 69 6e 67 73 20 61 | 72 65 20 70 65 72 66 6f |ndings a|re perfo|
|000040a0| 72 6d 65 64 0a 73 65 71 | 75 65 6e 74 69 61 6c 6c |rmed.seq|uentiall|
|000040b0| 79 20 66 72 6f 6d 20 6c | 65 66 74 20 74 6f 20 72 |y from l|eft to r|
|000040c0| 69 67 68 74 2c 20 61 6e | 64 20 74 68 65 20 72 65 |ight, an|d the re|
|000040d0| 67 69 6f 6e 5c 69 6e 64 | 65 78 7b 72 65 67 69 6f |gion\ind|ex{regio|
|000040e0| 6e 7d 20 6f 66 20 61 20 | 62 69 6e 64 69 6e 67 20 |n} of a |binding |
|000040f0| 69 6e 64 69 63 61 74 65 | 64 0a 62 79 20 7b 5c 63 |indicate|d.by {\c|
|00004100| 66 28 5c 68 79 70 65 72 | 7b 76 61 72 69 61 62 6c |f(\hyper|{variabl|
|00004110| 65 7d 20 5c 68 79 70 65 | 72 7b 69 6e 69 74 7d 29 |e} \hype|r{init})|
|00004120| 7d 20 69 73 20 74 68 61 | 74 20 70 61 72 74 20 6f |} is tha|t part o|
|00004130| 66 20 74 68 65 20 5c 69 | 64 65 7b 6c 65 74 2a 7d |f the \i|de{let*}|
|00004140| 0a 65 78 70 72 65 73 73 | 69 6f 6e 20 74 6f 20 74 |.express|ion to t|
|00004150| 68 65 20 72 69 67 68 74 | 20 6f 66 20 74 68 65 20 |he right| of the |
|00004160| 62 69 6e 64 69 6e 67 2e | 20 20 54 68 75 73 20 74 |binding.| Thus t|
|00004170| 68 65 20 73 65 63 6f 6e | 64 20 62 69 6e 64 69 6e |he secon|d bindin|
|00004180| 67 20 69 73 20 64 6f 6e | 65 0a 69 6e 20 61 6e 20 |g is don|e.in an |
|00004190| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 69 6e 20 77 |environm|ent in w|
|000041a0| 68 69 63 68 20 74 68 65 | 20 66 69 72 73 74 20 62 |hich the| first b|
|000041b0| 69 6e 64 69 6e 67 20 69 | 73 20 76 69 73 69 62 6c |inding i|s visibl|
|000041c0| 65 2c 20 61 6e 64 20 73 | 6f 20 6f 6e 2e 0a 0a 5c |e, and s|o on...\|
|000041d0| 62 65 67 69 6e 7b 73 63 | 68 65 6d 65 7d 0a 28 6c |begin{sc|heme}.(l|
|000041e0| 65 74 20 28 28 78 20 32 | 29 20 28 79 20 33 29 29 |et ((x 2|) (y 3))|
|000041f0| 0a 20 20 28 6c 65 74 2a | 20 28 28 78 20 37 29 0a |. (let*| ((x 7).|
|00004200| 20 20 20 20 20 20 20 20 | 20 28 7a 20 28 2b 20 78 | | (z (+ x|
|00004210| 20 79 29 29 29 0a 20 20 | 20 20 28 2a 20 7a 20 78 | y))). | (* z x|
|00004220| 29 29 29 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |))) | |
|00004230| 5c 65 76 20 20 37 30 25 | 0a 5c 65 6e 64 7b 73 63 |\ev 70%|.\end{sc|
|00004240| 68 65 6d 65 7d 0a 0a 5c | 65 6e 64 7b 65 6e 74 72 |heme}..\|end{entr|
|00004250| 79 7d 0a 0a 0a 5c 62 65 | 67 69 6e 7b 65 6e 74 72 |y}...\be|gin{entr|
|00004260| 79 7d 7b 25 0a 5c 70 72 | 6f 74 6f 7b 6c 65 74 72 |y}{%.\pr|oto{letr|
|00004270| 65 63 7d 7b 20 5c 68 79 | 70 65 72 7b 62 69 6e 64 |ec}{ \hy|per{bind|
|00004280| 69 6e 67 73 7d 20 5c 68 | 79 70 65 72 7b 62 6f 64 |ings} \h|yper{bod|
|00004290| 79 7d 7d 7b 65 73 73 65 | 6e 74 69 61 6c 20 5c 65 |y}}{esse|ntial \e|
|000042a0| 78 70 72 74 79 70 65 7d | 7d 0a 0a 5c 73 79 6e 74 |xprtype}|}..\synt|
|000042b0| 61 78 0a 5c 68 79 70 65 | 72 7b 42 69 6e 64 69 6e |ax.\hype|r{Bindin|
|000042c0| 67 73 7d 20 73 68 6f 75 | 6c 64 20 68 61 76 65 20 |gs} shou|ld have |
|000042d0| 74 68 65 20 66 6f 72 6d | 0a 5c 62 65 67 69 6e 7b |the form|.\begin{|
|000042e0| 73 63 68 65 6d 65 7d 0a | 28 28 5c 68 79 70 65 72 |scheme}.|((\hyper|
|000042f0| 69 7b 76 61 72 69 61 62 | 6c 65 7d 20 5c 68 79 70 |i{variab|le} \hyp|
|00004300| 65 72 69 7b 69 6e 69 74 | 7d 29 20 5c 64 6f 74 73 |eri{init|}) \dots|
|00004310| 66 6f 6f 29 5c 72 6d 2c | 25 0a 5c 65 6e 64 7b 73 |foo)\rm,|%.\end{s|
|00004320| 63 68 65 6d 65 7d 0a 61 | 6e 64 20 5c 68 79 70 65 |cheme}.a|nd \hype|
|00004330| 72 7b 62 6f 64 79 7d 20 | 73 68 6f 75 6c 64 20 62 |r{body} |should b|
|00004340| 65 20 61 20 73 65 71 75 | 65 6e 63 65 20 6f 66 0a |e a sequ|ence of.|
|00004350| 6f 6e 65 20 6f 72 20 6d | 6f 72 65 20 65 78 70 72 |one or m|ore expr|
|00004360| 65 73 73 69 6f 6e 73 2e | 20 49 74 20 69 73 20 61 |essions.| It is a|
|00004370| 6e 20 65 72 72 6f 72 20 | 66 6f 72 20 61 20 5c 68 |n error |for a \h|
|00004380| 79 70 65 72 7b 76 61 72 | 69 61 62 6c 65 7d 20 74 |yper{var|iable} t|
|00004390| 6f 20 61 70 70 65 61 72 | 20 6d 6f 72 65 0a 74 68 |o appear| more.th|
|000043a0| 61 6e 20 6f 6e 63 65 20 | 69 6e 20 74 68 65 20 6c |an once |in the l|
|000043b0| 69 73 74 20 6f 66 20 76 | 61 72 69 61 62 6c 65 73 |ist of v|ariables|
|000043c0| 20 62 65 69 6e 67 20 62 | 6f 75 6e 64 2e 0a 0a 5c | being b|ound...\|
|000043d0| 73 65 6d 61 6e 74 69 63 | 73 0a 54 68 65 20 5c 68 |semantic|s.The \h|
|000043e0| 79 70 65 72 7b 76 61 72 | 69 61 62 6c 65 7d 73 20 |yper{var|iable}s |
|000043f0| 61 72 65 20 62 6f 75 6e | 64 20 74 6f 20 66 72 65 |are boun|d to fre|
|00004400| 73 68 20 6c 6f 63 61 74 | 69 6f 6e 73 20 68 6f 6c |sh locat|ions hol|
|00004410| 64 69 6e 67 20 75 6e 64 | 65 66 69 6e 65 64 0a 76 |ding und|efined.v|
|00004420| 61 6c 75 65 73 2c 20 74 | 68 65 20 5c 68 79 70 65 |alues, t|he \hype|
|00004430| 72 7b 69 6e 69 74 7d 73 | 20 61 72 65 20 65 76 61 |r{init}s| are eva|
|00004440| 6c 75 61 74 65 64 20 69 | 6e 20 74 68 65 20 72 65 |luated i|n the re|
|00004450| 73 75 6c 74 69 6e 67 20 | 65 6e 76 69 72 6f 6e 6d |sulting |environm|
|00004460| 65 6e 74 20 28 69 6e 0a | 73 6f 6d 65 20 75 6e 73 |ent (in.|some uns|
|00004470| 70 65 63 69 66 69 65 64 | 20 6f 72 64 65 72 29 2c |pecified| order),|
|00004480| 20 65 61 63 68 20 5c 68 | 79 70 65 72 7b 76 61 72 | each \h|yper{var|
|00004490| 69 61 62 6c 65 7d 20 69 | 73 20 61 73 73 69 67 6e |iable} i|s assign|
|000044a0| 65 64 20 74 6f 20 74 68 | 65 20 72 65 73 75 6c 74 |ed to th|e result|
|000044b0| 0a 6f 66 20 74 68 65 20 | 63 6f 72 72 65 73 70 6f |.of the |correspo|
|000044c0| 6e 64 69 6e 67 20 5c 68 | 79 70 65 72 7b 69 6e 69 |nding \h|yper{ini|
|000044d0| 74 7d 2c 20 74 68 65 20 | 5c 68 79 70 65 72 7b 62 |t}, the |\hyper{b|
|000044e0| 6f 64 79 7d 20 69 73 20 | 65 76 61 6c 75 61 74 65 |ody} is |evaluate|
|000044f0| 64 20 69 6e 20 74 68 65 | 0a 72 65 73 75 6c 74 69 |d in the|.resulti|
|00004500| 6e 67 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 2c 20 |ng envir|onment, |
|00004510| 61 6e 64 20 74 68 65 20 | 76 61 6c 75 65 20 6f 66 |and the |value of|
|00004520| 20 74 68 65 20 6c 61 73 | 74 20 65 78 70 72 65 73 | the las|t expres|
|00004530| 73 69 6f 6e 20 69 6e 0a | 5c 68 79 70 65 72 7b 62 |sion in.|\hyper{b|
|00004540| 6f 64 79 7d 20 69 73 20 | 72 65 74 75 72 6e 65 64 |ody} is |returned|
|00004550| 2e 20 20 45 61 63 68 20 | 62 69 6e 64 69 6e 67 20 |. Each |binding |
|00004560| 6f 66 20 61 20 5c 68 79 | 70 65 72 7b 76 61 72 69 |of a \hy|per{vari|
|00004570| 61 62 6c 65 7d 20 68 61 | 73 20 74 68 65 0a 65 6e |able} ha|s the.en|
|00004580| 74 69 72 65 20 5c 69 64 | 65 7b 6c 65 74 72 65 63 |tire \id|e{letrec|
|00004590| 7d 20 65 78 70 72 65 73 | 73 69 6f 6e 20 61 73 20 |} expres|sion as |
|000045a0| 69 74 73 20 72 65 67 69 | 6f 6e 5c 69 6e 64 65 78 |its regi|on\index|
|000045b0| 7b 72 65 67 69 6f 6e 7d | 2c 20 6d 61 6b 69 6e 67 |{region}|, making|
|000045c0| 20 69 74 20 70 6f 73 73 | 69 62 6c 65 20 74 6f 0a | it poss|ible to.|
|000045d0| 64 65 66 69 6e 65 20 6d | 75 74 75 61 6c 6c 79 20 |define m|utually |
|000045e0| 72 65 63 75 72 73 69 76 | 65 20 70 72 6f 63 65 64 |recursiv|e proced|
|000045f0| 75 72 65 73 2e 0a 0a 5c | 62 65 67 69 6e 7b 73 63 |ures...\|begin{sc|
|00004600| 68 65 6d 65 7d 0a 25 28 | 6c 65 74 72 65 63 20 28 |heme}.%(|letrec (|
|00004610| 28 78 20 32 29 20 28 79 | 20 33 29 29 0a 25 20 20 |(x 2) (y| 3)).% |
|00004620| 28 6c 65 74 72 65 63 20 | 28 28 66 6f 6f 20 28 6c |(letrec |((foo (l|
|00004630| 61 6d 62 64 61 20 28 7a | 29 20 28 2b 20 78 20 79 |ambda (z|) (+ x y|
|00004640| 20 7a 29 29 29 20 28 78 | 20 37 29 29 0a 25 20 20 | z))) (x| 7)).% |
|00004650| 20 20 28 66 6f 6f 20 34 | 29 29 29 20 20 20 20 20 | (foo 4|))) |
|00004660| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 5c 65 | | \e|
|00004670| 76 20 20 31 34 0a 25 0a | 28 6c 65 74 72 65 63 20 |v 14.%.|(letrec |
|00004680| 28 28 65 76 65 6e 3f 0a | 20 20 20 20 20 20 20 20 |((even?.| |
|00004690| 20 20 28 6c 61 6d 62 64 | 61 20 28 6e 29 0a 20 20 | (lambd|a (n). |
|000046a0| 20 20 20 20 20 20 20 20 | 20 20 28 69 66 20 28 7a | | (if (z|
|000046b0| 65 72 6f 3f 20 6e 29 0a | 20 20 20 20 20 20 20 20 |ero? n).| |
|000046c0| 20 20 20 20 20 20 20 20 | 5c 73 63 68 74 72 75 65 | |\schtrue|
|000046d0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000046e0| 20 28 6f 64 64 3f 20 28 | 2d 20 6e 20 31 29 29 29 | (odd? (|- n 1)))|
|000046f0| 29 29 0a 20 20 20 20 20 | 20 20 20 20 28 6f 64 64 |)). | (odd|
|00004700| 3f 0a 20 20 20 20 20 20 | 20 20 20 20 28 6c 61 6d |?. | (lam|
|00004710| 62 64 61 20 28 6e 29 0a | 20 20 20 20 20 20 20 20 |bda (n).| |
|00004720| 20 20 20 20 28 69 66 20 | 28 7a 65 72 6f 3f 20 6e | (if |(zero? n|
|00004730| 29 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |). | |
|00004740| 20 20 5c 73 63 68 66 61 | 6c 73 65 0a 20 20 20 20 | \schfa|lse. |
|00004750| 20 20 20 20 20 20 20 20 | 20 20 20 20 28 65 76 65 | | (eve|
|00004760| 6e 3f 20 28 2d 20 6e 20 | 31 29 29 29 29 29 29 0a |n? (- n |1)))))).|
|00004770| 20 20 28 65 76 65 6e 3f | 20 38 38 29 29 20 20 20 | (even?| 88)) |
|00004780| 0a 09 09 5c 65 76 20 20 | 5c 73 63 68 74 72 75 65 |...\ev |\schtrue|
|00004790| 25 0a 5c 65 6e 64 7b 73 | 63 68 65 6d 65 7d 0a 0a |%.\end{s|cheme}..|
|000047a0| 4f 6e 65 20 72 65 73 74 | 72 69 63 74 69 6f 6e 20 |One rest|riction |
|000047b0| 6f 6e 20 5c 69 64 65 7b | 6c 65 74 72 65 63 7d 20 |on \ide{|letrec} |
|000047c0| 69 73 20 76 65 72 79 20 | 69 6d 70 6f 72 74 61 6e |is very |importan|
|000047d0| 74 3a 20 69 74 20 6d 75 | 73 74 20 62 65 20 70 6f |t: it mu|st be po|
|000047e0| 73 73 69 62 6c 65 0a 74 | 6f 20 65 76 61 6c 75 61 |ssible.t|o evalua|
|000047f0| 74 65 20 65 61 63 68 20 | 5c 68 79 70 65 72 7b 69 |te each |\hyper{i|
|00004800| 6e 69 74 7d 20 77 69 74 | 68 6f 75 74 20 61 73 73 |nit} wit|hout ass|
|00004810| 69 67 6e 69 6e 67 20 6f | 72 20 72 65 66 65 72 72 |igning o|r referr|
|00004820| 69 6e 67 20 74 6f 20 74 | 68 65 20 76 61 6c 75 65 |ing to t|he value|
|00004830| 20 6f 66 20 61 6e 79 0a | 5c 68 79 70 65 72 7b 76 | of any.|\hyper{v|
|00004840| 61 72 69 61 62 6c 65 7d | 2e 20 20 49 66 20 74 68 |ariable}|. If th|
|00004850| 69 73 20 72 65 73 74 72 | 69 63 74 69 6f 6e 20 69 |is restr|iction i|
|00004860| 73 20 76 69 6f 6c 61 74 | 65 64 2c 20 74 68 65 6e |s violat|ed, then|
|00004870| 20 69 74 20 69 73 20 61 | 6e 20 65 72 72 6f 72 2e | it is a|n error.|
|00004880| 20 20 54 68 65 0a 72 65 | 73 74 72 69 63 74 69 6f | The.re|strictio|
|00004890| 6e 20 69 73 20 6e 65 63 | 65 73 73 61 72 79 20 62 |n is nec|essary b|
|000048a0| 65 63 61 75 73 65 20 53 | 63 68 65 6d 65 20 70 61 |ecause S|cheme pa|
|000048b0| 73 73 65 73 20 61 72 67 | 75 6d 65 6e 74 73 20 62 |sses arg|uments b|
|000048c0| 79 20 76 61 6c 75 65 20 | 72 61 74 68 65 72 20 74 |y value |rather t|
|000048d0| 68 61 6e 20 62 79 0a 6e | 61 6d 65 2e 20 20 49 6e |han by.n|ame. In|
|000048e0| 20 74 68 65 20 6d 6f 73 | 74 20 63 6f 6d 6d 6f 6e | the mos|t common|
|000048f0| 20 75 73 65 73 20 6f 66 | 20 5c 69 64 65 7b 6c 65 | uses of| \ide{le|
|00004900| 74 72 65 63 7d 2c 20 61 | 6c 6c 20 74 68 65 20 5c |trec}, a|ll the \|
|00004910| 68 79 70 65 72 7b 69 6e | 69 74 7d 73 20 61 72 65 |hyper{in|it}s are|
|00004920| 0a 5c 6c 61 6d 62 64 61 | 65 78 70 7b 7d 73 20 61 |.\lambda|exp{}s a|
|00004930| 6e 64 20 74 68 65 20 72 | 65 73 74 72 69 63 74 69 |nd the r|estricti|
|00004940| 6f 6e 20 69 73 20 73 61 | 74 69 73 66 69 65 64 20 |on is sa|tisfied |
|00004950| 61 75 74 6f 6d 61 74 69 | 63 61 6c 6c 79 2e 0a 0a |automati|cally...|
|00004960| 25 20 5c 74 6f 64 6f 7b | 75 73 65 20 6f 72 20 75 |% \todo{|use or u|
|00004970| 73 65 73 3f 20 20 2d 2d | 2d 20 4a 69 6e 78 2e 7d |ses? --|- Jinx.}|
|00004980| 0a 0a 5c 65 6e 64 7b 65 | 6e 74 72 79 7d 0a 0a 0a |..\end{e|ntry}...|
|00004990| 5c 73 75 62 73 65 63 74 | 69 6f 6e 7b 53 65 71 75 |\subsect|ion{Sequ|
|000049a0| 65 6e 63 69 6e 67 7d 5c | 75 6e 73 65 63 74 69 6f |encing}\|unsectio|
|000049b0| 6e 0a 0a 5c 62 65 67 69 | 6e 7b 65 6e 74 72 79 7d |n..\begi|n{entry}|
|000049c0| 7b 25 0a 5c 70 72 6f 74 | 6f 7b 62 65 67 69 6e 7d |{%.\prot|o{begin}|
|000049d0| 7b 20 5c 68 79 70 65 72 | 69 7b 65 78 70 72 65 73 |{ \hyper|i{expres|
|000049e0| 73 69 6f 6e 7d 20 5c 68 | 79 70 65 72 69 69 7b 65 |sion} \h|yperii{e|
|000049f0| 78 70 72 65 73 73 69 6f | 6e 7d 20 5c 64 6f 74 73 |xpressio|n} \dots|
|00004a00| 66 6f 6f 7d 7b 65 73 73 | 65 6e 74 69 61 6c 20 5c |foo}{ess|ential \|
|00004a10| 65 78 70 72 74 79 70 65 | 7d 7d 0a 0a 54 68 65 20 |exprtype|}}..The |
|00004a20| 5c 68 79 70 65 72 7b 65 | 78 70 72 65 73 73 69 6f |\hyper{e|xpressio|
|00004a30| 6e 7d 73 20 61 72 65 20 | 65 76 61 6c 75 61 74 65 |n}s are |evaluate|
|00004a40| 64 20 73 65 71 75 65 6e | 74 69 61 6c 6c 79 20 66 |d sequen|tially f|
|00004a50| 72 6f 6d 20 6c 65 66 74 | 20 74 6f 20 72 69 67 68 |rom left| to righ|
|00004a60| 74 2c 0a 61 6e 64 20 74 | 68 65 20 76 61 6c 75 65 |t,.and t|he value|
|00004a70| 20 6f 66 20 74 68 65 20 | 6c 61 73 74 20 5c 68 79 | of the |last \hy|
|00004a80| 70 65 72 7b 65 78 70 72 | 65 73 73 69 6f 6e 7d 20 |per{expr|ession} |
|00004a90| 69 73 20 72 65 74 75 72 | 6e 65 64 2e 20 20 54 68 |is retur|ned. Th|
|00004aa0| 69 73 0a 65 78 70 72 65 | 73 73 69 6f 6e 20 74 79 |is.expre|ssion ty|
|00004ab0| 70 65 20 69 73 20 75 73 | 65 64 20 74 6f 20 73 65 |pe is us|ed to se|
|00004ac0| 71 75 65 6e 63 65 20 73 | 69 64 65 20 65 66 66 65 |quence s|ide effe|
|00004ad0| 63 74 73 20 73 75 63 68 | 20 61 73 20 69 6e 70 75 |cts such| as inpu|
|00004ae0| 74 20 61 6e 64 0a 6f 75 | 74 70 75 74 2e 0a 0a 5c |t and.ou|tput...\|
|00004af0| 62 65 67 69 6e 7b 73 63 | 68 65 6d 65 7d 0a 28 64 |begin{sc|heme}.(d|
|00004b00| 65 66 69 6e 65 20 78 20 | 30 29 0a 0a 28 62 65 67 |efine x |0)..(beg|
|00004b10| 69 6e 20 28 73 65 74 21 | 20 78 20 35 29 0a 20 20 |in (set!| x 5). |
|00004b20| 20 20 20 20 20 28 2b 20 | 78 20 31 29 29 20 20 20 | (+ |x 1)) |
|00004b30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 5c | | \|
|00004b40| 65 76 20 20 36 0a 0a 28 | 62 65 67 69 6e 20 28 64 |ev 6..(|begin (d|
|00004b50| 69 73 70 6c 61 79 20 22 | 34 20 70 6c 75 73 20 31 |isplay "|4 plus 1|
|00004b60| 20 65 71 75 61 6c 73 20 | 22 29 0a 20 20 20 20 20 | equals |"). |
|00004b70| 20 20 28 64 69 73 70 6c | 61 79 20 28 2b 20 34 20 | (displ|ay (+ 4 |
|00004b80| 31 29 29 29 20 20 20 20 | 20 20 5c 65 76 20 20 5c |1))) | \ev \|
|00004b90| 75 6e 73 70 65 63 69 66 | 69 65 64 0a 20 5c 3e 7b |unspecif|ied. \>{|
|00004ba0| 5c 65 6d 20 61 6e 64 20 | 70 72 69 6e 74 73 7d 20 |\em and |prints} |
|00004bb0| 20 34 20 70 6c 75 73 20 | 31 20 65 71 75 61 6c 73 | 4 plus |1 equals|
|00004bc0| 20 35 25 0a 5c 65 6e 64 | 7b 73 63 68 65 6d 65 7d | 5%.\end|{scheme}|
|00004bd0| 0a 0a 5c 62 65 67 69 6e | 7b 6e 6f 74 65 7d 0a 5c |..\begin|{note}.\|
|00004be0| 63 69 74 65 7b 53 49 43 | 50 7d 20 75 73 65 73 20 |cite{SIC|P} uses |
|00004bf0| 74 68 65 20 6b 65 79 77 | 6f 72 64 20 5c 69 64 65 |the keyw|ord \ide|
|00004c00| 7b 73 65 71 75 65 6e 63 | 65 7d 20 69 6e 73 74 65 |{sequenc|e} inste|
|00004c10| 61 64 20 6f 66 20 5c 69 | 64 65 7b 62 65 67 69 6e |ad of \i|de{begin|
|00004c20| 7d 2e 0a 5c 65 6e 64 7b | 6e 6f 74 65 7d 0a 0a 5c |}..\end{|note}..\|
|00004c30| 65 6e 64 7b 65 6e 74 72 | 79 7d 0a 0a 0a 5c 73 75 |end{entr|y}...\su|
|00004c40| 62 73 65 63 74 69 6f 6e | 7b 49 74 65 72 61 74 69 |bsection|{Iterati|
|00004c50| 6f 6e 7d 25 5c 75 6e 73 | 65 63 74 69 6f 6e 0a 0a |on}%\uns|ection..|
|00004c60| 5c 6e 6f 69 6e 64 65 6e | 74 25 0a 5c 70 70 72 6f |\noinden|t%.\ppro|
|00004c70| 74 6f 7b 28 64 6f 20 28 | 28 5c 68 79 70 65 72 69 |to{(do (|(\hyperi|
|00004c80| 7b 76 61 72 69 61 62 6c | 65 7d 20 5c 68 79 70 65 |{variabl|e} \hype|
|00004c90| 72 69 7b 69 6e 69 74 7d | 20 5c 68 79 70 65 72 69 |ri{init}| \hyperi|
|00004ca0| 7b 73 74 65 70 7d 29 7d | 7b 5c 65 78 70 72 74 79 |{step})}|{\exprty|
|00004cb0| 70 65 7d 0a 5c 6d 61 69 | 6e 73 63 68 69 6e 64 65 |pe}.\mai|nschinde|
|00004cc0| 78 7b 64 6f 7d 7b 5c 74 | 74 5c 6f 62 65 79 73 70 |x{do}{\t|t\obeysp|
|00004cd0| 61 63 65 73 25 0a 20 20 | 20 20 20 5c 64 6f 74 73 |aces%. | \dots|
|00004ce0| 66 6f 6f 29 5c 5c 0a 20 | 20 20 20 28 5c 68 79 70 |foo)\\. | (\hyp|
|00004cf0| 65 72 7b 74 65 73 74 7d | 20 5c 68 79 70 65 72 7b |er{test}| \hyper{|
|00004d00| 65 78 70 72 65 73 73 69 | 6f 6e 7d 20 5c 64 6f 74 |expressi|on} \dot|
|00004d10| 73 66 6f 6f 29 5c 5c 0a | 20 20 5c 68 79 70 65 72 |sfoo)\\.| \hyper|
|00004d20| 7b 63 6f 6d 6d 61 6e 64 | 7d 20 5c 64 6f 74 73 66 |{command|} \dotsf|
|00004d30| 6f 6f 29 7d 0a 0a 5c 69 | 64 65 7b 44 6f 7d 20 69 |oo)}..\i|de{Do} i|
|00004d40| 73 20 61 6e 20 69 74 65 | 72 61 74 69 6f 6e 20 63 |s an ite|ration c|
|00004d50| 6f 6e 73 74 72 75 63 74 | 2e 20 20 49 74 20 73 70 |onstruct|. It sp|
|00004d60| 65 63 69 66 69 65 73 20 | 61 20 73 65 74 20 6f 66 |ecifies |a set of|
|00004d70| 20 76 61 72 69 61 62 6c | 65 73 20 74 6f 0a 62 65 | variabl|es to.be|
|00004d80| 20 62 6f 75 6e 64 2c 20 | 68 6f 77 20 74 68 65 79 | bound, |how they|
|00004d90| 20 61 72 65 20 74 6f 20 | 62 65 20 69 6e 69 74 69 | are to |be initi|
|00004da0| 61 6c 69 7a 65 64 20 61 | 74 20 74 68 65 20 73 74 |alized a|t the st|
|00004db0| 61 72 74 2c 20 61 6e 64 | 20 68 6f 77 20 74 68 65 |art, and| how the|
|00004dc0| 79 20 61 72 65 0a 74 6f | 20 62 65 20 75 70 64 61 |y are.to| be upda|
|00004dd0| 74 65 64 20 6f 6e 20 65 | 61 63 68 20 69 74 65 72 |ted on e|ach iter|
|00004de0| 61 74 69 6f 6e 2e 20 20 | 57 68 65 6e 20 61 20 74 |ation. |When a t|
|00004df0| 65 72 6d 69 6e 61 74 69 | 6f 6e 20 63 6f 6e 64 69 |erminati|on condi|
|00004e00| 74 69 6f 6e 20 69 73 20 | 6d 65 74 2c 0a 74 68 65 |tion is |met,.the|
|00004e10| 20 6c 6f 6f 70 20 65 78 | 69 74 73 20 77 69 74 68 | loop ex|its with|
|00004e20| 20 61 20 73 70 65 63 69 | 66 69 65 64 20 72 65 73 | a speci|fied res|
|00004e30| 75 6c 74 20 76 61 6c 75 | 65 2e 0a 0a 5c 69 64 65 |ult valu|e...\ide|
|00004e40| 7b 44 6f 7d 20 65 78 70 | 72 65 73 73 69 6f 6e 73 |{Do} exp|ressions|
|00004e50| 20 61 72 65 20 65 76 61 | 6c 75 61 74 65 64 20 61 | are eva|luated a|
|00004e60| 73 20 66 6f 6c 6c 6f 77 | 73 3a 0a 54 68 65 20 5c |s follow|s:.The \|
|00004e70| 68 79 70 65 72 7b 69 6e | 69 74 7d 20 65 78 70 72 |hyper{in|it} expr|
|00004e80| 65 73 73 69 6f 6e 73 20 | 61 72 65 20 65 76 61 6c |essions |are eval|
|00004e90| 75 61 74 65 64 20 28 69 | 6e 20 73 6f 6d 65 20 75 |uated (i|n some u|
|00004ea0| 6e 73 70 65 63 69 66 69 | 65 64 20 6f 72 64 65 72 |nspecifi|ed order|
|00004eb0| 29 2c 0a 74 68 65 20 5c | 68 79 70 65 72 7b 76 61 |),.the \|hyper{va|
|00004ec0| 72 69 61 62 6c 65 7d 73 | 20 61 72 65 20 62 6f 75 |riable}s| are bou|
|00004ed0| 6e 64 20 74 6f 20 66 72 | 65 73 68 20 6c 6f 63 61 |nd to fr|esh loca|
|00004ee0| 74 69 6f 6e 73 2c 20 74 | 68 65 20 72 65 73 75 6c |tions, t|he resul|
|00004ef0| 74 73 20 6f 66 20 74 68 | 65 0a 5c 68 79 70 65 72 |ts of th|e.\hyper|
|00004f00| 7b 69 6e 69 74 7d 20 65 | 78 70 72 65 73 73 69 6f |{init} e|xpressio|
|00004f10| 6e 73 20 61 72 65 20 73 | 74 6f 72 65 64 20 69 6e |ns are s|tored in|
|00004f20| 20 74 68 65 20 62 69 6e | 64 69 6e 67 73 20 6f 66 | the bin|dings of|
|00004f30| 20 74 68 65 0a 5c 68 79 | 70 65 72 7b 76 61 72 69 | the.\hy|per{vari|
|00004f40| 61 62 6c 65 7d 73 2c 20 | 61 6e 64 20 74 68 65 6e |able}s, |and then|
|00004f50| 20 74 68 65 20 69 74 65 | 72 61 74 69 6f 6e 20 70 | the ite|ration p|
|00004f60| 68 61 73 65 20 62 65 67 | 69 6e 73 2e 0a 0a 5c 76 |hase beg|ins...\v|
|00004f70| 65 73 74 20 45 61 63 68 | 20 69 74 65 72 61 74 69 |est Each| iterati|
|00004f80| 6f 6e 20 62 65 67 69 6e | 73 20 62 79 20 65 76 61 |on begin|s by eva|
|00004f90| 6c 75 61 74 69 6e 67 20 | 5c 68 79 70 65 72 7b 74 |luating |\hyper{t|
|00004fa0| 65 73 74 7d 3b 20 69 66 | 20 74 68 65 20 72 65 73 |est}; if| the res|
|00004fb0| 75 6c 74 20 69 73 0a 66 | 61 6c 73 65 20 28 73 65 |ult is.f|alse (se|
|00004fc0| 65 20 73 65 63 74 69 6f | 6e 7e 5c 72 65 66 7b 62 |e sectio|n~\ref{b|
|00004fd0| 6f 6f 6c 65 61 6e 73 65 | 63 74 69 6f 6e 7d 29 2c |ooleanse|ction}),|
|00004fe0| 20 74 68 65 6e 20 74 68 | 65 20 5c 68 79 70 65 72 | then th|e \hyper|
|00004ff0| 7b 63 6f 6d 6d 61 6e 64 | 7d 0a 65 78 70 72 65 73 |{command|}.expres|
|00005000| 73 69 6f 6e 73 20 61 72 | 65 20 65 76 61 6c 75 61 |sions ar|e evalua|
|00005010| 74 65 64 20 69 6e 20 6f | 72 64 65 72 20 66 6f 72 |ted in o|rder for|
|00005020| 20 65 66 66 65 63 74 2c | 20 74 68 65 20 5c 68 79 | effect,| the \hy|
|00005030| 70 65 72 7b 73 74 65 70 | 7d 0a 65 78 70 72 65 73 |per{step|}.expres|
|00005040| 73 69 6f 6e 73 20 61 72 | 65 20 65 76 61 6c 75 61 |sions ar|e evalua|
|00005050| 74 65 64 20 69 6e 20 73 | 6f 6d 65 20 75 6e 73 70 |ted in s|ome unsp|
|00005060| 65 63 69 66 69 65 64 20 | 6f 72 64 65 72 2c 20 74 |ecified |order, t|
|00005070| 68 65 0a 5c 68 79 70 65 | 72 7b 76 61 72 69 61 62 |he.\hype|r{variab|
|00005080| 6c 65 7d 73 20 61 72 65 | 20 62 6f 75 6e 64 20 74 |le}s are| bound t|
|00005090| 6f 20 66 72 65 73 68 20 | 6c 6f 63 61 74 69 6f 6e |o fresh |location|
|000050a0| 73 2c 20 74 68 65 20 72 | 65 73 75 6c 74 73 20 6f |s, the r|esults o|
|000050b0| 66 20 74 68 65 0a 5c 68 | 79 70 65 72 7b 73 74 65 |f the.\h|yper{ste|
|000050c0| 70 7d 73 20 61 72 65 20 | 73 74 6f 72 65 64 20 69 |p}s are |stored i|
|000050d0| 6e 20 74 68 65 20 62 69 | 6e 64 69 6e 67 73 20 6f |n the bi|ndings o|
|000050e0| 66 20 74 68 65 0a 5c 68 | 79 70 65 72 7b 76 61 72 |f the.\h|yper{var|
|000050f0| 69 61 62 6c 65 7d 73 2c | 20 61 6e 64 20 74 68 65 |iable}s,| and the|
|00005100| 20 6e 65 78 74 20 69 74 | 65 72 61 74 69 6f 6e 20 | next it|eration |
|00005110| 62 65 67 69 6e 73 2e 0a | 0a 5c 76 65 73 74 20 49 |begins..|.\vest I|
|00005120| 66 20 5c 68 79 70 65 72 | 7b 74 65 73 74 7d 20 65 |f \hyper|{test} e|
|00005130| 76 61 6c 75 61 74 65 73 | 20 74 6f 20 61 20 74 72 |valuates| to a tr|
|00005140| 75 65 20 76 61 6c 75 65 | 2c 20 74 68 65 6e 20 74 |ue value|, then t|
|00005150| 68 65 0a 5c 68 79 70 65 | 72 7b 65 78 70 72 65 73 |he.\hype|r{expres|
|00005160| 73 69 6f 6e 7d 73 20 61 | 72 65 20 65 76 61 6c 75 |sion}s a|re evalu|
|00005170| 61 74 65 64 20 66 72 6f | 6d 20 6c 65 66 74 20 74 |ated fro|m left t|
|00005180| 6f 20 72 69 67 68 74 20 | 61 6e 64 20 74 68 65 20 |o right |and the |
|00005190| 76 61 6c 75 65 20 6f 66 | 0a 74 68 65 20 6c 61 73 |value of|.the las|
|000051a0| 74 20 5c 68 79 70 65 72 | 7b 65 78 70 72 65 73 73 |t \hyper|{express|
|000051b0| 69 6f 6e 7d 20 69 73 20 | 72 65 74 75 72 6e 65 64 |ion} is |returned|
|000051c0| 20 61 73 20 74 68 65 20 | 76 61 6c 75 65 20 6f 66 | as the |value of|
|000051d0| 20 74 68 65 20 5c 69 64 | 65 7b 64 6f 7d 0a 65 78 | the \id|e{do}.ex|
|000051e0| 70 72 65 73 73 69 6f 6e | 2e 20 20 49 66 20 6e 6f |pression|. If no|
|000051f0| 20 5c 68 79 70 65 72 7b | 65 78 70 72 65 73 73 69 | \hyper{|expressi|
|00005200| 6f 6e 7d 73 20 61 72 65 | 20 70 72 65 73 65 6e 74 |on}s are| present|
|00005210| 2c 20 74 68 65 6e 20 74 | 68 65 20 76 61 6c 75 65 |, then t|he value|
|00005220| 20 6f 66 0a 74 68 65 20 | 5c 69 64 65 7b 64 6f 7d | of.the |\ide{do}|
|00005230| 20 65 78 70 72 65 73 73 | 69 6f 6e 20 69 73 20 75 | express|ion is u|
|00005240| 6e 73 70 65 63 69 66 69 | 65 64 2e 0a 0a 5c 76 65 |nspecifi|ed...\ve|
|00005250| 73 74 20 54 68 65 20 72 | 65 67 69 6f 6e 5c 69 6e |st The r|egion\in|
|00005260| 64 65 78 7b 72 65 67 69 | 6f 6e 7d 20 6f 66 20 74 |dex{regi|on} of t|
|00005270| 68 65 20 62 69 6e 64 69 | 6e 67 20 6f 66 20 61 20 |he bindi|ng of a |
|00005280| 5c 68 79 70 65 72 7b 76 | 61 72 69 61 62 6c 65 7d |\hyper{v|ariable}|
|00005290| 0a 63 6f 6e 73 69 73 74 | 73 20 6f 66 20 74 68 65 |.consist|s of the|
|000052a0| 20 65 6e 74 69 72 65 20 | 5c 69 64 65 7b 64 6f 7d | entire |\ide{do}|
|000052b0| 20 65 78 70 72 65 73 73 | 69 6f 6e 20 65 78 63 65 | express|ion exce|
|000052c0| 70 74 20 66 6f 72 20 74 | 68 65 20 5c 68 79 70 65 |pt for t|he \hype|
|000052d0| 72 7b 69 6e 69 74 7d 73 | 2e 0a 49 74 20 69 73 20 |r{init}s|..It is |
|000052e0| 61 6e 20 65 72 72 6f 72 | 20 66 6f 72 20 61 20 5c |an error| for a \|
|000052f0| 68 79 70 65 72 7b 76 61 | 72 69 61 62 6c 65 7d 20 |hyper{va|riable} |
|00005300| 74 6f 20 61 70 70 65 61 | 72 20 6d 6f 72 65 20 74 |to appea|r more t|
|00005310| 68 61 6e 20 6f 6e 63 65 | 20 69 6e 20 74 68 65 0a |han once| in the.|
|00005320| 6c 69 73 74 20 6f 66 20 | 5c 69 64 65 7b 64 6f 7d |list of |\ide{do}|
|00005330| 20 76 61 72 69 61 62 6c | 65 73 2e 0a 0a 5c 76 65 | variabl|es...\ve|
|00005340| 73 74 20 41 20 5c 68 79 | 70 65 72 7b 73 74 65 70 |st A \hy|per{step|
|00005350| 7d 20 6d 61 79 20 62 65 | 20 6f 6d 69 74 74 65 64 |} may be| omitted|
|00005360| 2c 20 69 6e 20 77 68 69 | 63 68 20 63 61 73 65 20 |, in whi|ch case |
|00005370| 74 68 65 20 65 66 66 65 | 63 74 20 69 73 20 74 68 |the effe|ct is th|
|00005380| 65 0a 73 61 6d 65 20 61 | 73 20 69 66 20 7b 5c 63 |e.same a|s if {\c|
|00005390| 66 28 5c 68 79 70 65 72 | 7b 76 61 72 69 61 62 6c |f(\hyper|{variabl|
|000053a0| 65 7d 20 5c 68 79 70 65 | 72 7b 69 6e 69 74 7d 20 |e} \hype|r{init} |
|000053b0| 5c 68 79 70 65 72 7b 76 | 61 72 69 61 62 6c 65 7d |\hyper{v|ariable}|
|000053c0| 29 7d 20 68 61 64 0a 62 | 65 65 6e 20 77 72 69 74 |)} had.b|een writ|
|000053d0| 74 65 6e 20 69 6e 73 74 | 65 61 64 20 6f 66 20 7b |ten inst|ead of {|
|000053e0| 5c 63 66 28 5c 68 79 70 | 65 72 7b 76 61 72 69 61 |\cf(\hyp|er{varia|
|000053f0| 62 6c 65 7d 20 5c 68 79 | 70 65 72 7b 69 6e 69 74 |ble} \hy|per{init|
|00005400| 7d 29 7d 2e 0a 0a 5c 62 | 65 67 69 6e 7b 73 63 68 |})}...\b|egin{sch|
|00005410| 65 6d 65 7d 0a 28 64 6f | 20 28 28 76 65 63 20 28 |eme}.(do| ((vec (|
|00005420| 6d 61 6b 65 2d 76 65 63 | 74 6f 72 20 35 29 29 0a |make-vec|tor 5)).|
|00005430| 20 20 20 20 20 28 69 20 | 30 20 28 2b 20 69 20 31 | (i |0 (+ i 1|
|00005440| 29 29 29 0a 20 20 20 20 | 28 28 3d 20 69 20 35 29 |))). |((= i 5)|
|00005450| 20 76 65 63 29 0a 20 20 | 28 76 65 63 74 6f 72 2d | vec). |(vector-|
|00005460| 73 65 74 21 20 76 65 63 | 20 69 20 69 29 29 20 20 |set! vec| i i)) |
|00005470| 20 20 20 20 20 20 20 20 | 5c 65 76 20 20 5c 23 28 | |\ev \#(|
|00005480| 30 20 31 20 32 20 33 20 | 34 29 0a 0a 28 6c 65 74 |0 1 2 3 |4)..(let|
|00005490| 20 28 28 78 20 27 28 31 | 20 33 20 35 20 37 20 39 | ((x '(1| 3 5 7 9|
|000054a0| 29 29 29 0a 20 20 28 64 | 6f 20 28 28 78 20 78 20 |))). (d|o ((x x |
|000054b0| 28 63 64 72 20 78 29 29 | 0a 20 20 20 20 20 20 20 |(cdr x))|. |
|000054c0| 28 73 75 6d 20 30 20 28 | 2b 20 73 75 6d 20 28 63 |(sum 0 (|+ sum (c|
|000054d0| 61 72 20 78 29 29 29 29 | 0a 20 20 20 20 20 20 28 |ar x))))|. (|
|000054e0| 28 6e 75 6c 6c 3f 20 78 | 29 20 73 75 6d 29 29 29 |(null? x|) sum)))|
|000054f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 5c 65 76 | | \ev|
|00005500| 20 20 32 35 25 0a 5c 65 | 6e 64 7b 73 63 68 65 6d | 25%.\e|nd{schem|
|00005510| 65 7d 0a 0a 25 5c 65 6e | 64 7b 65 6e 74 72 79 7d |e}..%\en|d{entry}|
|00005520| 0a 0a 0a 5c 62 65 67 69 | 6e 7b 65 6e 74 72 79 7d |...\begi|n{entry}|
|00005530| 7b 25 0a 5c 70 72 6f 74 | 6f 7b 6c 65 74 7d 7b 20 |{%.\prot|o{let}{ |
|00005540| 5c 68 79 70 65 72 7b 76 | 61 72 69 61 62 6c 65 7d |\hyper{v|ariable}|
|00005550| 20 5c 68 79 70 65 72 7b | 62 69 6e 64 69 6e 67 73 | \hyper{|bindings|
|00005560| 7d 20 5c 68 79 70 65 72 | 7b 62 6f 64 79 7d 7d 7b |} \hyper|{body}}{|
|00005570| 5c 65 78 70 72 74 79 70 | 65 7d 7d 0a 0a 5c 6c 61 |\exprtyp|e}}..\la|
|00005580| 62 65 6c 7b 6e 61 6d 65 | 64 6c 65 74 7d 0a 53 6f |bel{name|dlet}.So|
|00005590| 6d 65 20 69 6d 70 6c 65 | 6d 65 6e 74 61 74 69 6f |me imple|mentatio|
|000055a0| 6e 73 20 6f 66 20 53 63 | 68 65 6d 65 20 70 65 72 |ns of Sc|heme per|
|000055b0| 6d 69 74 20 61 20 76 61 | 72 69 61 6e 74 20 6f 6e |mit a va|riant on|
|000055c0| 20 74 68 65 20 73 79 6e | 74 61 78 20 6f 66 0a 5c | the syn|tax of.\|
|000055d0| 69 64 65 7b 6c 65 74 7d | 20 63 61 6c 6c 65 64 20 |ide{let}| called |
|000055e0| 60 60 6e 61 6d 65 64 20 | 5c 69 64 65 7b 6c 65 74 |``named |\ide{let|
|000055f0| 7d 27 27 20 77 68 69 63 | 68 20 70 72 6f 76 69 64 |}'' whic|h provid|
|00005600| 65 73 20 61 20 6d 6f 72 | 65 20 67 65 6e 65 72 61 |es a mor|e genera|
|00005610| 6c 0a 6c 6f 6f 70 69 6e | 67 20 63 6f 6e 73 74 72 |l.loopin|g constr|
|00005620| 75 63 74 20 74 68 61 6e | 20 5c 69 64 65 7b 64 6f |uct than| \ide{do|
|00005630| 7d 2c 20 61 6e 64 20 6d | 61 79 20 61 6c 73 6f 20 |}, and m|ay also |
|00005640| 62 65 20 75 73 65 64 20 | 74 6f 20 65 78 70 72 65 |be used |to expre|
|00005650| 73 73 0a 72 65 63 75 72 | 73 69 6f 6e 73 2e 0a 0a |ss.recur|sions...|
|00005660| 4e 61 6d 65 64 20 5c 69 | 64 65 7b 6c 65 74 7d 20 |Named \i|de{let} |
|00005670| 68 61 73 20 74 68 65 20 | 73 61 6d 65 20 73 79 6e |has the |same syn|
|00005680| 74 61 78 20 61 6e 64 20 | 73 65 6d 61 6e 74 69 63 |tax and |semantic|
|00005690| 73 20 61 73 20 6f 72 64 | 69 6e 61 72 79 20 5c 69 |s as ord|inary \i|
|000056a0| 64 65 7b 6c 65 74 7d 0a | 65 78 63 65 70 74 20 74 |de{let}.|except t|
|000056b0| 68 61 74 20 5c 68 79 70 | 65 72 7b 76 61 72 69 61 |hat \hyp|er{varia|
|000056c0| 62 6c 65 7d 20 69 73 20 | 62 6f 75 6e 64 20 77 69 |ble} is |bound wi|
|000056d0| 74 68 69 6e 20 5c 68 79 | 70 65 72 7b 62 6f 64 79 |thin \hy|per{body|
|000056e0| 7d 20 74 6f 20 61 20 70 | 72 6f 63 65 64 75 72 65 |} to a p|rocedure|
|000056f0| 0a 77 68 6f 73 65 20 66 | 6f 72 6d 61 6c 20 61 72 |.whose f|ormal ar|
|00005700| 67 75 6d 65 6e 74 73 20 | 61 72 65 20 74 68 65 20 |guments |are the |
|00005710| 62 6f 75 6e 64 20 76 61 | 72 69 61 62 6c 65 73 20 |bound va|riables |
|00005720| 61 6e 64 20 77 68 6f 73 | 65 20 62 6f 64 79 20 69 |and whos|e body i|
|00005730| 73 0a 5c 68 79 70 65 72 | 7b 62 6f 64 79 7d 2e 20 |s.\hyper|{body}. |
|00005740| 20 54 68 75 73 20 74 68 | 65 20 65 78 65 63 75 74 | Thus th|e execut|
|00005750| 69 6f 6e 20 6f 66 20 5c | 68 79 70 65 72 7b 62 6f |ion of \|hyper{bo|
|00005760| 64 79 7d 20 6d 61 79 20 | 62 65 20 72 65 70 65 61 |dy} may |be repea|
|00005770| 74 65 64 20 62 79 0a 69 | 6e 76 6f 6b 69 6e 67 20 |ted by.i|nvoking |
|00005780| 74 68 65 20 70 72 6f 63 | 65 64 75 72 65 20 6e 61 |the proc|edure na|
|00005790| 6d 65 64 20 62 79 20 5c | 68 79 70 65 72 7b 76 61 |med by \|hyper{va|
|000057a0| 72 69 61 62 6c 65 7d 2e | 0a 0a 25 20 20 20 20 20 |riable}.|..% |
|000057b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000057c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000057d0| 20 20 20 20 20 20 20 20 | 20 7c 20 20 3c 2d 2d 20 | | | <-- |
|000057e0| 72 69 67 68 74 20 6d 61 | 72 67 69 6e 0a 5c 62 65 |right ma|rgin.\be|
|000057f0| 67 69 6e 7b 73 63 68 65 | 6d 65 7d 0a 28 6c 65 74 |gin{sche|me}.(let|
|00005800| 20 6c 6f 6f 70 20 28 28 | 6e 75 6d 62 65 72 73 20 | loop ((|numbers |
|00005810| 27 28 33 20 2d 32 20 31 | 20 36 20 2d 35 29 29 0a |'(3 -2 1| 6 -5)).|
|00005820| 20 20 20 20 20 20 20 20 | 20 20 20 28 6e 6f 6e 6e | | (nonn|
|00005830| 65 67 20 27 28 29 29 0a | 20 20 20 20 20 20 20 20 |eg '()).| |
|00005840| 20 20 20 28 6e 65 67 20 | 27 28 29 29 29 0a 20 20 | (neg |'())). |
|00005850| 28 63 6f 6e 64 20 28 28 | 6e 75 6c 6c 3f 20 6e 75 |(cond ((|null? nu|
|00005860| 6d 62 65 72 73 29 20 28 | 6c 69 73 74 20 6e 6f 6e |mbers) (|list non|
|00005870| 6e 65 67 20 6e 65 67 29 | 29 0a 20 20 20 20 20 20 |neg neg)|). |
|00005880| 20 20 28 28 3e 3d 20 28 | 63 61 72 20 6e 75 6d 62 | ((>= (|car numb|
|00005890| 65 72 73 29 20 30 29 0a | 20 20 20 20 20 20 20 20 |ers) 0).| |
|000058a0| 20 28 6c 6f 6f 70 20 28 | 63 64 72 20 6e 75 6d 62 | (loop (|cdr numb|
|000058b0| 65 72 73 29 0a 20 20 20 | 20 20 20 20 20 20 20 20 |ers). | |
|000058c0| 20 20 20 20 28 63 6f 6e | 73 20 28 63 61 72 20 6e | (con|s (car n|
|000058d0| 75 6d 62 65 72 73 29 20 | 6e 6f 6e 6e 65 67 29 0a |umbers) |nonneg).|
|000058e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6e | | n|
|000058f0| 65 67 29 29 0a 20 20 20 | 20 20 20 20 20 28 28 3c |eg)). | ((<|
|00005900| 20 28 63 61 72 20 6e 75 | 6d 62 65 72 73 29 20 30 | (car nu|mbers) 0|
|00005910| 29 0a 20 20 20 20 20 20 | 20 20 20 28 6c 6f 6f 70 |). | (loop|
|00005920| 20 28 63 64 72 20 6e 75 | 6d 62 65 72 73 29 0a 20 | (cdr nu|mbers). |
|00005930| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6e 6f | | no|
|00005940| 6e 6e 65 67 0a 20 20 20 | 20 20 20 20 20 20 20 20 |nneg. | |
|00005950| 20 20 20 20 28 63 6f 6e | 73 20 28 63 61 72 20 6e | (con|s (car n|
|00005960| 75 6d 62 65 72 73 29 20 | 6e 65 67 29 29 29 29 29 |umbers) |neg)))))|
|00005970| 20 25 0a 20 20 5c 6c 65 | 76 20 20 28 28 36 20 31 | %. \le|v ((6 1|
|00005980| 20 33 29 20 28 2d 35 20 | 2d 32 29 29 25 0a 5c 65 | 3) (-5 |-2))%.\e|
|00005990| 6e 64 7b 73 63 68 65 6d | 65 7d 0a 0a 5c 65 6e 64 |nd{schem|e}..\end|
|000059a0| 7b 65 6e 74 72 79 7d 0a | 0a 0a 5c 73 75 62 73 65 |{entry}.|..\subse|
|000059b0| 63 74 69 6f 6e 7b 44 65 | 6c 61 79 65 64 20 65 76 |ction{De|layed ev|
|000059c0| 61 6c 75 61 74 69 6f 6e | 7d 5c 75 6e 73 65 63 74 |aluation|}\unsect|
|000059d0| 69 6f 6e 0a 5c 6c 61 62 | 65 6c 7b 64 65 6c 61 79 |ion.\lab|el{delay|
|000059e0| 7d 0a 0a 5c 62 65 67 69 | 6e 7b 65 6e 74 72 79 7d |}..\begi|n{entry}|
|000059f0| 7b 25 0a 5c 70 72 6f 74 | 6f 7b 64 65 6c 61 79 7d |{%.\prot|o{delay}|
|00005a00| 7b 20 5c 68 79 70 65 72 | 7b 65 78 70 72 65 73 73 |{ \hyper|{express|
|00005a10| 69 6f 6e 7d 7d 7b 5c 65 | 78 70 72 74 79 70 65 7d |ion}}{\e|xprtype}|
|00005a20| 7d 0a 0a 5c 74 6f 64 6f | 7b 46 69 78 2e 7d 0a 0a |}..\todo|{Fix.}..|
|00005a30| 54 68 65 20 5c 69 64 65 | 7b 64 65 6c 61 79 7d 20 |The \ide|{delay} |
|00005a40| 63 6f 6e 73 74 72 75 63 | 74 20 69 73 20 75 73 65 |construc|t is use|
|00005a50| 64 20 74 6f 67 65 74 68 | 65 72 20 77 69 74 68 20 |d togeth|er with |
|00005a60| 74 68 65 20 70 72 6f 63 | 65 64 75 72 65 20 5c 69 |the proc|edure \i|
|00005a70| 64 65 7b 66 6f 72 63 65 | 7d 20 74 6f 0a 69 6d 70 |de{force|} to.imp|
|00005a80| 6c 65 6d 65 6e 74 20 5c | 64 65 66 69 6e 69 6e 67 |lement \|defining|
|00005a90| 7b 6c 61 7a 79 20 65 76 | 61 6c 75 61 74 69 6f 6e |{lazy ev|aluation|
|00005aa0| 7d 20 6f 72 20 5c 64 65 | 66 69 6e 69 6e 67 7b 63 |} or \de|fining{c|
|00005ab0| 61 6c 6c 20 62 79 20 6e | 65 65 64 7d 2e 0a 7b 5c |all by n|eed}..{\|
|00005ac0| 74 74 28 64 65 6c 61 79 | 20 5c 68 79 70 65 72 7b |tt(delay| \hyper{|
|00005ad0| 65 78 70 72 65 73 73 69 | 6f 6e 7d 29 7d 20 72 65 |expressi|on})} re|
|00005ae0| 74 75 72 6e 73 20 61 6e | 20 6f 62 6a 65 63 74 20 |turns an| object |
|00005af0| 63 61 6c 6c 65 64 20 61 | 0a 5c 64 65 66 69 6e 69 |called a|.\defini|
|00005b00| 6e 67 7b 70 72 6f 6d 69 | 73 65 7d 20 77 68 69 63 |ng{promi|se} whic|
|00005b10| 68 20 61 74 20 73 6f 6d | 65 20 70 6f 69 6e 74 20 |h at som|e point |
|00005b20| 69 6e 20 74 68 65 20 66 | 75 74 75 72 65 20 6d 61 |in the f|uture ma|
|00005b30| 79 20 62 65 20 61 73 6b | 65 64 20 28 62 79 0a 74 |y be ask|ed (by.t|
|00005b40| 68 65 20 5c 69 64 65 7b | 66 6f 72 63 65 7d 20 70 |he \ide{|force} p|
|00005b50| 72 6f 63 65 64 75 72 65 | 29 20 5c 74 6f 64 6f 7b |rocedure|) \todo{|
|00005b60| 42 61 72 74 6c 65 79 27 | 73 20 77 68 69 74 65 20 |Bartley'|s white |
|00005b70| 6c 69 65 3b 20 4f 4b 3f | 7d 20 74 6f 20 65 76 61 |lie; OK?|} to eva|
|00005b80| 6c 75 61 74 65 0a 5c 68 | 79 70 65 72 7b 65 78 70 |luate.\h|yper{exp|
|00005b90| 72 65 73 73 69 6f 6e 7d | 20 61 6e 64 20 64 65 6c |ression}| and del|
|00005ba0| 69 76 65 72 20 74 68 65 | 20 72 65 73 75 6c 74 69 |iver the| resulti|
|00005bb0| 6e 67 20 76 61 6c 75 65 | 2e 0a 0a 53 65 65 20 74 |ng value|...See t|
|00005bc0| 68 65 20 64 65 73 63 72 | 69 70 74 69 6f 6e 20 6f |he descr|iption o|
|00005bd0| 66 20 5c 69 64 65 7b 66 | 6f 72 63 65 7d 20 28 73 |f \ide{f|orce} (s|
|00005be0| 65 63 74 69 6f 6e 7e 5c | 72 65 66 7b 66 6f 72 63 |ection~\|ref{forc|
|00005bf0| 65 7d 29 20 66 6f 72 20 | 61 0a 6d 6f 72 65 20 63 |e}) for |a.more c|
|00005c00| 6f 6d 70 6c 65 74 65 20 | 64 65 73 63 72 69 70 74 |omplete |descript|
|00005c10| 69 6f 6e 20 6f 66 20 5c | 69 64 65 7b 64 65 6c 61 |ion of \|ide{dela|
|00005c20| 79 7d 2e 0a 0a 5c 65 6e | 64 7b 65 6e 74 72 79 7d |y}...\en|d{entry}|
|00005c30| 0a 0a 0a 5c 73 75 62 73 | 65 63 74 69 6f 6e 7b 51 |...\subs|ection{Q|
|00005c40| 75 61 73 69 71 75 6f 74 | 61 74 69 6f 6e 7d 5c 75 |uasiquot|ation}\u|
|00005c50| 6e 73 65 63 74 69 6f 6e | 0a 5c 6c 61 62 65 6c 7b |nsection|.\label{|
|00005c60| 71 75 61 73 69 71 75 6f | 74 65 73 65 63 74 69 6f |quasiquo|tesectio|
|00005c70| 6e 7d 0a 0a 5c 62 65 67 | 69 6e 7b 65 6e 74 72 79 |n}..\beg|in{entry|
|00005c80| 7d 7b 25 0a 5c 70 72 6f | 74 6f 7b 71 75 61 73 69 |}{%.\pro|to{quasi|
|00005c90| 71 75 6f 74 65 7d 7b 20 | 5c 68 79 70 65 72 7b 74 |quote}{ |\hyper{t|
|00005ca0| 65 6d 70 6c 61 74 65 7d | 7d 7b 65 73 73 65 6e 74 |emplate}|}{essent|
|00005cb0| 69 61 6c 20 5c 65 78 70 | 72 74 79 70 65 7d 20 5c |ial \exp|rtype} \|
|00005cc0| 6e 6f 70 61 67 65 62 72 | 65 61 6b 0a 5c 70 70 72 |nopagebr|eak.\ppr|
|00005cd0| 6f 74 6f 7b 5c 62 61 63 | 6b 71 75 6f 74 65 5c 68 |oto{\bac|kquote\h|
|00005ce0| 79 70 65 72 7b 74 65 6d | 70 6c 61 74 65 7d 7d 7b |yper{tem|plate}}{|
|00005cf0| 65 73 73 65 6e 74 69 61 | 6c 20 5c 65 78 70 72 74 |essentia|l \exprt|
|00005d00| 79 70 65 7d 7d 0a 0a 60 | 60 42 61 63 6b 71 75 6f |ype}}..`|`Backquo|
|00005d10| 74 65 27 27 20 6f 72 20 | 60 60 71 75 61 73 69 71 |te'' or |``quasiq|
|00005d20| 75 6f 74 65 27 27 5c 69 | 6e 64 65 78 7b 62 61 63 |uote''\i|ndex{bac|
|00005d30| 6b 71 75 6f 74 65 7d 20 | 65 78 70 72 65 73 73 69 |kquote} |expressi|
|00005d40| 6f 6e 73 20 61 72 65 20 | 75 73 65 66 75 6c 0a 66 |ons are |useful.f|
|00005d50| 6f 72 20 63 6f 6e 73 74 | 72 75 63 74 69 6e 67 20 |or const|ructing |
|00005d60| 61 20 6c 69 73 74 20 6f | 72 20 76 65 63 74 6f 72 |a list o|r vector|
|00005d70| 20 73 74 72 75 63 74 75 | 72 65 20 77 68 65 6e 20 | structu|re when |
|00005d80| 6d 6f 73 74 20 62 75 74 | 20 6e 6f 74 20 61 6c 6c |most but| not all|
|00005d90| 20 6f 66 20 74 68 65 0a | 64 65 73 69 72 65 64 20 | of the.|desired |
|00005da0| 73 74 72 75 63 74 75 72 | 65 20 69 73 20 6b 6e 6f |structur|e is kno|
|00005db0| 77 6e 20 69 6e 20 61 64 | 76 61 6e 63 65 2e 20 20 |wn in ad|vance. |
|00005dc0| 49 66 20 6e 6f 0a 63 6f | 6d 6d 61 73 5c 69 6e 64 |If no.co|mmas\ind|
|00005dd0| 65 78 7b 63 6f 6d 6d 61 | 7d 20 61 70 70 65 61 72 |ex{comma|} appear|
|00005de0| 20 77 69 74 68 69 6e 20 | 74 68 65 20 5c 68 79 70 | within |the \hyp|
|00005df0| 65 72 7b 74 65 6d 70 6c | 61 74 65 7d 2c 20 74 68 |er{templ|ate}, th|
|00005e00| 65 20 72 65 73 75 6c 74 | 20 6f 66 20 65 76 61 6c |e result| of eval|
|00005e10| 75 61 74 69 6e 67 0a 5c | 62 61 63 6b 71 75 6f 74 |uating.\|backquot|
|00005e20| 65 5c 68 79 70 65 72 7b | 74 65 6d 70 6c 61 74 65 |e\hyper{|template|
|00005e30| 7d 20 69 73 20 65 71 75 | 69 76 61 6c 65 6e 74 20 |} is equ|ivalent |
|00005e40| 74 6f 20 74 68 65 20 72 | 65 73 75 6c 74 20 6f 66 |to the r|esult of|
|00005e50| 20 65 76 61 6c 75 61 74 | 69 6e 67 0a 5c 73 69 6e | evaluat|ing.\sin|
|00005e60| 67 6c 65 71 75 6f 74 65 | 5c 68 79 70 65 72 7b 74 |glequote|\hyper{t|
|00005e70| 65 6d 70 6c 61 74 65 7d | 2e 20 20 49 66 20 61 20 |emplate}|. If a |
|00005e80| 63 6f 6d 6d 61 5c 6d 61 | 69 6e 73 63 68 69 6e 64 |comma\ma|inschind|
|00005e90| 65 78 7b 2c 7d 20 61 70 | 70 65 61 72 73 20 77 69 |ex{,} ap|pears wi|
|00005ea0| 74 68 69 6e 20 74 68 65 | 0a 5c 68 79 70 65 72 7b |thin the|.\hyper{|
|00005eb0| 74 65 6d 70 6c 61 74 65 | 7d 2c 20 68 6f 77 65 76 |template|}, howev|
|00005ec0| 65 72 2c 20 74 68 65 20 | 65 78 70 72 65 73 73 69 |er, the |expressi|
|00005ed0| 6f 6e 20 66 6f 6c 6c 6f | 77 69 6e 67 20 74 68 65 |on follo|wing the|
|00005ee0| 20 63 6f 6d 6d 61 20 69 | 73 0a 65 76 61 6c 75 61 | comma i|s.evalua|
|00005ef0| 74 65 64 20 28 60 60 75 | 6e 71 75 6f 74 65 64 27 |ted (``u|nquoted'|
|00005f00| 27 29 20 61 6e 64 20 69 | 74 73 20 72 65 73 75 6c |') and i|ts resul|
|00005f10| 74 20 69 73 20 69 6e 73 | 65 72 74 65 64 20 69 6e |t is ins|erted in|
|00005f20| 74 6f 20 74 68 65 20 73 | 74 72 75 63 74 75 72 65 |to the s|tructure|
|00005f30| 0a 69 6e 73 74 65 61 64 | 20 6f 66 20 74 68 65 20 |.instead| of the |
|00005f40| 63 6f 6d 6d 61 20 61 6e | 64 20 74 68 65 20 65 78 |comma an|d the ex|
|00005f50| 70 72 65 73 73 69 6f 6e | 2e 20 20 49 66 20 61 20 |pression|. If a |
|00005f60| 63 6f 6d 6d 61 20 61 70 | 70 65 61 72 73 20 66 6f |comma ap|pears fo|
|00005f70| 6c 6c 6f 77 65 64 0a 69 | 6d 6d 65 64 69 61 74 65 |llowed.i|mmediate|
|00005f80| 6c 79 20 62 79 20 61 6e | 20 61 74 2d 73 69 67 6e |ly by an| at-sign|
|00005f90| 20 28 5c 61 74 73 69 67 | 6e 29 2c 5c 69 6e 64 65 | (\atsig|n),\inde|
|00005fa0| 78 7b 61 74 2d 73 69 67 | 6e 7d 20 74 68 65 6e 20 |x{at-sig|n} then |
|00005fb0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 0a 65 78 |the foll|owing.ex|
|00005fc0| 70 72 65 73 73 69 6f 6e | 20 6d 75 73 74 20 65 76 |pression| must ev|
|00005fd0| 61 6c 75 61 74 65 20 74 | 6f 20 61 20 6c 69 73 74 |aluate t|o a list|
|00005fe0| 3b 20 74 68 65 20 6f 70 | 65 6e 69 6e 67 20 61 6e |; the op|ening an|
|00005ff0| 64 20 63 6c 6f 73 69 6e | 67 20 70 61 72 65 6e 74 |d closin|g parent|
|00006000| 68 65 73 65 73 0a 6f 66 | 20 74 68 65 20 6c 69 73 |heses.of| the lis|
|00006010| 74 20 61 72 65 20 74 68 | 65 6e 20 60 60 73 74 72 |t are th|en ``str|
|00006020| 69 70 70 65 64 20 61 77 | 61 79 27 27 20 61 6e 64 |ipped aw|ay'' and|
|00006030| 20 74 68 65 20 65 6c 65 | 6d 65 6e 74 73 20 6f 66 | the ele|ments of|
|00006040| 20 74 68 65 20 6c 69 73 | 74 20 61 72 65 0a 69 6e | the lis|t are.in|
|00006050| 73 65 72 74 65 64 20 69 | 6e 20 70 6c 61 63 65 20 |serted i|n place |
|00006060| 6f 66 20 74 68 65 20 63 | 6f 6d 6d 61 20 61 74 2d |of the c|omma at-|
|00006070| 73 69 67 6e 20 65 78 70 | 72 65 73 73 69 6f 6e 20 |sign exp|ression |
|00006080| 73 65 71 75 65 6e 63 65 | 2e 0a 0a 25 20 73 74 72 |sequence|...% str|
|00006090| 75 63 6b 3a 20 22 28 69 | 6e 20 74 68 65 20 73 65 |uck: "(i|n the se|
|000060a0| 6e 73 65 20 6f 66 20 5c | 69 64 65 7b 65 71 75 61 |nse of \|ide{equa|
|000060b0| 6c 3f 7d 29 22 20 61 66 | 74 65 72 20 22 65 71 75 |l?})" af|ter "equ|
|000060c0| 69 76 61 6c 65 6e 74 22 | 0a 0a 5c 62 65 67 69 6e |ivalent"|..\begin|
|000060d0| 7b 73 63 68 65 6d 65 7d | 0a 60 28 6c 69 73 74 20 |{scheme}|.`(list |
|000060e0| 2c 28 2b 20 31 20 32 29 | 20 34 29 20 20 5c 65 76 |,(+ 1 2)| 4) \ev|
|000060f0| 20 20 28 6c 69 73 74 20 | 33 20 34 29 0a 28 6c 65 | (list |3 4).(le|
|00006100| 74 20 28 28 6e 61 6d 65 | 20 27 61 29 29 20 60 28 |t ((name| 'a)) `(|
|00006110| 6c 69 73 74 20 2c 6e 61 | 6d 65 20 27 2c 6e 61 6d |list ,na|me ',nam|
|00006120| 65 29 29 20 25 0a 20 20 | 20 20 20 20 20 20 20 20 |e)) %. | |
|00006130| 5c 6c 65 76 20 20 28 6c | 69 73 74 20 61 20 28 71 |\lev (l|ist a (q|
|00006140| 75 6f 74 65 20 61 29 29 | 0a 60 28 61 20 2c 28 2b |uote a))|.`(a ,(+|
|00006150| 20 31 20 32 29 20 2c 40 | 28 6d 61 70 20 61 62 73 | 1 2) ,@|(map abs|
|00006160| 20 27 28 34 20 2d 35 20 | 36 29 29 20 62 29 20 25 | '(4 -5 |6)) b) %|
|00006170| 0a 20 20 20 20 20 20 20 | 20 20 20 5c 6c 65 76 20 |. | \lev |
|00006180| 20 28 61 20 33 20 34 20 | 35 20 36 20 62 29 0a 60 | (a 3 4 |5 6 b).`|
|00006190| 28 28 5c 69 64 65 7b 66 | 6f 6f 7d 20 2c 28 2d 20 |((\ide{f|oo} ,(- |
|000061a0| 31 30 20 33 29 29 20 2c | 40 28 63 64 72 20 27 28 |10 3)) ,|@(cdr '(|
|000061b0| 63 29 29 20 2e 20 2c 28 | 63 61 72 20 27 28 63 6f |c)) . ,(|car '(co|
|000061c0| 6e 73 29 29 29 20 25 0a | 20 20 20 20 20 20 20 20 |ns))) %.| |
|000061d0| 20 20 5c 6c 65 76 20 20 | 28 28 66 6f 6f 20 37 29 | \lev |((foo 7)|
|000061e0| 20 2e 20 63 6f 6e 73 29 | 0a 60 5c 23 28 31 30 20 | . cons)|.`\#(10 |
|000061f0| 35 20 2c 28 73 71 72 74 | 20 34 29 20 2c 40 28 6d |5 ,(sqrt| 4) ,@(m|
|00006200| 61 70 20 73 71 72 74 20 | 27 28 31 36 20 39 29 29 |ap sqrt |'(16 9))|
|00006210| 20 38 29 20 25 0a 20 20 | 20 20 20 20 20 20 20 20 | 8) %. | |
|00006220| 5c 6c 65 76 20 20 5c 23 | 28 31 30 20 35 20 32 20 |\lev \#|(10 5 2 |
|00006230| 34 20 33 20 38 29 25 0a | 5c 65 6e 64 7b 73 63 68 |4 3 8)%.|\end{sch|
|00006240| 65 6d 65 7d 0a 0a 51 75 | 61 73 69 71 75 6f 74 65 |eme}..Qu|asiquote|
|00006250| 20 66 6f 72 6d 73 20 6d | 61 79 20 62 65 20 6e 65 | forms m|ay be ne|
|00006260| 73 74 65 64 2e 20 20 53 | 75 62 73 74 69 74 75 74 |sted. S|ubstitut|
|00006270| 69 6f 6e 73 20 61 72 65 | 20 6d 61 64 65 20 6f 6e |ions are| made on|
|00006280| 6c 79 20 66 6f 72 0a 75 | 6e 71 75 6f 74 65 64 20 |ly for.u|nquoted |
|00006290| 63 6f 6d 70 6f 6e 65 6e | 74 73 20 61 70 70 65 61 |componen|ts appea|
|000062a0| 72 69 6e 67 20 61 74 20 | 74 68 65 20 73 61 6d 65 |ring at |the same|
|000062b0| 20 6e 65 73 74 69 6e 67 | 20 6c 65 76 65 6c 0a 61 | nesting| level.a|
|000062c0| 73 20 74 68 65 20 6f 75 | 74 65 72 6d 6f 73 74 20 |s the ou|termost |
|000062d0| 62 61 63 6b 71 75 6f 74 | 65 2e 20 20 54 68 65 20 |backquot|e. The |
|000062e0| 6e 65 73 74 69 6e 67 20 | 6c 65 76 65 6c 20 69 6e |nesting |level in|
|000062f0| 63 72 65 61 73 65 73 20 | 62 79 20 6f 6e 65 20 69 |creases |by one i|
|00006300| 6e 73 69 64 65 0a 65 61 | 63 68 20 73 75 63 63 65 |nside.ea|ch succe|
|00006310| 73 73 69 76 65 20 71 75 | 61 73 69 71 75 6f 74 61 |ssive qu|asiquota|
|00006320| 74 69 6f 6e 2c 20 61 6e | 64 20 64 65 63 72 65 61 |tion, an|d decrea|
|00006330| 73 65 73 20 62 79 20 6f | 6e 65 20 69 6e 73 69 64 |ses by o|ne insid|
|00006340| 65 20 65 61 63 68 0a 75 | 6e 71 75 6f 74 61 74 69 |e each.u|nquotati|
|00006350| 6f 6e 2e 0a 0a 5c 62 65 | 67 69 6e 7b 73 63 68 65 |on...\be|gin{sche|
|00006360| 6d 65 7d 0a 60 28 61 20 | 60 28 62 20 2c 28 2b 20 |me}.`(a |`(b ,(+ |
|00006370| 31 20 32 29 20 2c 28 66 | 6f 6f 20 2c 28 2b 20 31 |1 2) ,(f|oo ,(+ 1|
|00006380| 20 33 29 20 64 29 20 65 | 29 20 66 29 20 25 0a 20 | 3) d) e|) f) %. |
|00006390| 20 20 20 20 20 20 20 20 | 20 5c 6c 65 76 20 20 28 | | \lev (|
|000063a0| 61 20 60 28 62 20 2c 28 | 2b 20 31 20 32 29 20 2c |a `(b ,(|+ 1 2) ,|
|000063b0| 28 66 6f 6f 20 34 20 64 | 29 20 65 29 20 66 29 0a |(foo 4 d|) e) f).|
|000063c0| 28 6c 65 74 20 28 28 6e | 61 6d 65 31 20 27 78 29 |(let ((n|ame1 'x)|
|000063d0| 0a 20 20 20 20 20 20 28 | 6e 61 6d 65 32 20 27 79 |. (|name2 'y|
|000063e0| 29 29 0a 20 20 60 28 61 | 20 60 28 62 20 2c 2c 6e |)). `(a| `(b ,,n|
|000063f0| 61 6d 65 31 20 2c 27 2c | 6e 61 6d 65 32 20 64 29 |ame1 ,',|name2 d)|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.