⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 r5rs-z-h-7.html

📁 scheme 标准(r5rs)。Scheme是MIT发布的基于Lambda运算的语言
💻 HTML
📖 第 1 页 / 共 4 页
字号:
&nbsp;&nbsp;&nbsp;&nbsp;(-&nbsp;3&nbsp;2)<br>&nbsp;&nbsp;&nbsp;&nbsp;(+&nbsp;3&nbsp;2))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;1<p></tt><p><p><p><a name="%_sec_4.1.6"></a><h3><a href="r5rs-Z-H-2.html#%_toc_%_sec_4.1.6">4.1.6&nbsp;&nbsp;Assignments</a></h3><p><p><p><p><p><div align=left><u>syntax:</u>&nbsp;&nbsp;<tt>(<a name="%_idx_102"></a>set!<i> &lt;variable&gt; &lt;expression&gt;</i>)</tt>&nbsp;</div><p>&lt;Expression&gt; is evaluated, and the resulting value is stored inthe location to which &lt;variable&gt; is bound.  &lt;Variable&gt; mustbe bound either in some region<a name="%_idx_104"></a> enclosing the <tt>set!</tt> expressionor at top level.  The result of the <tt>set!</tt> expression isunspecified.<p><tt><p>(define&nbsp;x&nbsp;2)<br>(+&nbsp;x&nbsp;1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;3<br>(set!&nbsp;x&nbsp;4)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;<i>unspecified</i><br>(+&nbsp;x&nbsp;1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;5<p></tt><p><p><p><a name="%_sec_4.2"></a><h2><a href="r5rs-Z-H-2.html#%_toc_%_sec_4.2">4.2&nbsp;&nbsp;Derived expression types</a></h2><p><p>The constructs in this section are hygienic, as discussed insection&nbsp;<a href="#%_sec_4.3">4.3</a>.For reference purposes, section&nbsp;<a href="r5rs-Z-H-10.html#%_sec_7.3">7.3</a> gives macro definitionsthat will convert most of the constructs described in this section into the primitive constructs described in the previous section.<p><p><a name="%_sec_4.2.1"></a><h3><a href="r5rs-Z-H-2.html#%_toc_%_sec_4.2.1">4.2.1&nbsp;&nbsp;Conditionals</a></h3><p><p><p><p><p><div align=left><u>library syntax:</u>&nbsp;&nbsp;<tt>(<a name="%_idx_106"></a>cond<i> &lt;clause<sub>1</sub>&gt; &lt;clause<sub>2</sub>&gt; <tt>...</tt></i>)</tt>&nbsp;</div><p><em>Syntax: </em>Each &lt;clause&gt; should be of the form<tt><p>(&lt;test&gt;&nbsp;&lt;expression<sub>1</sub>&gt;&nbsp;<tt>...</tt>)<p></tt>where &lt;test&gt; is any expression.  Alternatively, a &lt;clause&gt; may beof the form<tt><p>(&lt;test&gt;&nbsp;=&gt;&nbsp;&lt;expression&gt;)<p></tt>The last &lt;clause&gt; may bean ``else clause,'' which has the form<tt><p>(else&nbsp;&lt;expression<sub>1</sub>&gt;&nbsp;&lt;expression<sub>2</sub>&gt;&nbsp;<tt>...</tt>).<p></tt><a name="%_idx_108"></a><a name="%_idx_110"></a><p><em>Semantics: </em>A <tt>cond</tt> expression is evaluated by evaluating the &lt;test&gt;expressions of successive &lt;clause&gt;s in order until one of themevaluates to a true value<a name="%_idx_112"></a> (seesection&nbsp;<a href="r5rs-Z-H-9.html#%_sec_6.3.1">6.3.1</a>).  When a &lt;test&gt; evaluates to a truevalue, then the remaining &lt;expression&gt;s in its &lt;clause&gt; areevaluated in order, and the result(s) of the last &lt;expression&gt; in the&lt;clause&gt; is(are) returned as the result(s) of the entire <tt>cond</tt>expression.  If the selected &lt;clause&gt; contains only the&lt;test&gt; and no &lt;expression&gt;s, then the value of the&lt;test&gt; is returned as the result.  If the selected &lt;clause&gt; uses the<tt>=&gt;</tt> alternate form, then the &lt;expression&gt; is evaluated.Its value must be a procedure that accepts one argument; this procedure is thencalled on the value of the &lt;test&gt; and the value(s) returned by thisprocedure is(are) returned by the <tt>cond</tt> expression.If all &lt;test&gt;s evaluateto false values, and there is no else clause, then the result ofthe conditional expression is unspecified; if there is an elseclause, then its &lt;expression&gt;s are evaluated, and the value(s) ofthe last one is(are) returned.<p><tt><p>(cond&nbsp;((&gt;&nbsp;3&nbsp;2)&nbsp;'greater)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((&lt;&nbsp;3&nbsp;2)&nbsp;'less))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;greater<br>(cond&nbsp;((&gt;&nbsp;3&nbsp;3)&nbsp;'greater)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((&lt;&nbsp;3&nbsp;3)&nbsp;'less)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(else&nbsp;'equal))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;equal<br>(cond&nbsp;((assv&nbsp;'b&nbsp;'((a&nbsp;1)&nbsp;(b&nbsp;2)))&nbsp;=&gt;&nbsp;cadr)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(else&nbsp;<tt>#f</tt>))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;2<p></tt><p><p><p><p><div align=left><u>library syntax:</u>&nbsp;&nbsp;<tt>(<a name="%_idx_114"></a>case<i> &lt;key&gt; &lt;clause<sub>1</sub>&gt; &lt;clause<sub>2</sub>&gt; <tt>...</tt></i>)</tt>&nbsp;</div><p><em>Syntax: </em>&lt;Key&gt; may be any expression.  Each &lt;clause&gt; should havethe form<tt><p>((&lt;datum<sub>1</sub>&gt;&nbsp;<tt>...</tt>)&nbsp;&lt;expression<sub>1</sub>&gt;&nbsp;&lt;expression<sub>2</sub>&gt;&nbsp;<tt>...</tt>),<p></tt>where each &lt;datum&gt; is an external representation of some object.All the &lt;datum&gt;s must be distinct.The last &lt;clause&gt; may be an ``else clause,'' which has the form<tt><p>(else&nbsp;&lt;expression<sub>1</sub>&gt;&nbsp;&lt;expression<sub>2</sub>&gt;&nbsp;<tt>...</tt>).<p></tt><a name="%_idx_116"></a><p><em>Semantics: </em>A <tt>case</tt> expression is evaluated as follows.  &lt;Key&gt; isevaluated and its result is compared against each &lt;datum&gt;.  If theresult of evaluating &lt;key&gt; is equivalent (in the sense of<tt>eqv?</tt>; see section&nbsp;<a href="r5rs-Z-H-9.html#%_sec_6.1">6.1</a>) to a &lt;datum&gt;, then theexpressions in the corresponding &lt;clause&gt; are evaluated from leftto right and the result(s) of the last expression in the &lt;clause&gt; is(are)returned as the result(s) of the <tt>case</tt> expression.  If the result ofevaluating &lt;key&gt; is different from every &lt;datum&gt;, then ifthere is an else clause its expressions are evaluated and theresult(s) of the last is(are) the result(s) of the <tt>case</tt> expression;otherwise the result of the <tt>case</tt> expression is unspecified.<p><tt><p>(case&nbsp;(*&nbsp;2&nbsp;3)<br>&nbsp;&nbsp;((2&nbsp;3&nbsp;5&nbsp;7)&nbsp;'prime)<br>&nbsp;&nbsp;((1&nbsp;4&nbsp;6&nbsp;8&nbsp;9)&nbsp;'composite))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;composite<br>(case&nbsp;(car&nbsp;'(c&nbsp;d))<br>&nbsp;&nbsp;((a)&nbsp;'a)<br>&nbsp;&nbsp;((b)&nbsp;'b))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;<i>unspecified</i><br>(case&nbsp;(car&nbsp;'(c&nbsp;d))<br>&nbsp;&nbsp;((a&nbsp;e&nbsp;i&nbsp;o&nbsp;u)&nbsp;'vowel)<br>&nbsp;&nbsp;((w&nbsp;y)&nbsp;'semivowel)<br>&nbsp;&nbsp;(else&nbsp;'consonant))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;consonant<p></tt><p><p><p><p><div align=left><u>library syntax:</u>&nbsp;&nbsp;<tt>(<a name="%_idx_118"></a>and<i> &lt;test<sub>1</sub>&gt; <tt>...</tt></i>)</tt>&nbsp;</div><p>The &lt;test&gt; expressions are evaluated from left to right, and thevalue of the first expression that evaluates to a false value (seesection&nbsp;<a href="r5rs-Z-H-9.html#%_sec_6.3.1">6.3.1</a>) is returned.  Any remaining expressionsare not evaluated.  If all the expressions evaluate to true values, thevalue of the last expression is returned.  If there are no expressionsthen <tt>#t</tt> is returned.<p><tt><p>(and&nbsp;(=&nbsp;2&nbsp;2)&nbsp;(&gt;&nbsp;2&nbsp;1))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;<tt>#t</tt><br>(and&nbsp;(=&nbsp;2&nbsp;2)&nbsp;(&lt;&nbsp;2&nbsp;1))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;<tt>#f</tt><br>(and&nbsp;1&nbsp;2&nbsp;'c&nbsp;'(f&nbsp;g))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;(f&nbsp;g)<br>(and)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;<tt>#t</tt><p></tt><p><p><p><p><div align=left><u>library syntax:</u>&nbsp;&nbsp;<tt>(<a name="%_idx_120"></a>or<i> &lt;test<sub>1</sub>&gt; <tt>...</tt></i>)</tt>&nbsp;</div><p>The &lt;test&gt; expressions are evaluated from left to right, and the value of thefirst expression that evaluates to a true value (seesection&nbsp;<a href="r5rs-Z-H-9.html#%_sec_6.3.1">6.3.1</a>) is returned.  Any remaining expressionsare not evaluated.  If all expressions evaluate to false values, thevalue of the last expression is returned.  If there are noexpressions then <tt>#f</tt> is returned.<p><tt><p>(or&nbsp;(=&nbsp;2&nbsp;2)&nbsp;(&gt;&nbsp;2&nbsp;1))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;<tt>#t</tt><br>(or&nbsp;(=&nbsp;2&nbsp;2)&nbsp;(&lt;&nbsp;2&nbsp;1))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;<tt>#t</tt><br>(or&nbsp;<tt>#f</tt>&nbsp;<tt>#f</tt>&nbsp;<tt>#f</tt>)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;<tt>#f</tt><br>(or&nbsp;(memq&nbsp;'b&nbsp;'(a&nbsp;b&nbsp;c))&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;(/&nbsp;3&nbsp;0))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;(b&nbsp;c)<p></tt><p><p><p><a name="%_sec_4.2.2"></a><h3><a href="r5rs-Z-H-2.html#%_toc_%_sec_4.2.2">4.2.2&nbsp;&nbsp;Binding constructs</a></h3><p>The three binding constructs <tt>let</tt>, <tt>let*</tt>, and <tt>letrec</tt>give Scheme a block structure, like Algol 60.  The syntax of the threeconstructs is identical, but they differ in the regions<a name="%_idx_122"></a> they establishfor their variable bindings.  In a <tt>let</tt> expression, the initialvalues are computed before any of the variables become bound; in a<tt>let*</tt> expression, the bindings and evaluations are performedsequentially; while in a <tt>letrec</tt> expression, all the bindings are ineffect while their initial values are being computed, thus allowingmutually recursive definitions.<p><p><div align=left><u>library syntax:</u>&nbsp;&nbsp;<tt>(<a name="%_idx_124"></a>let<i> &lt;bindings&gt; &lt;body&gt;</i>)</tt>&nbsp;</div><p><em>Syntax: </em>&lt;Bindings&gt; should have the form<tt><p>((&lt;variable<sub>1</sub>&gt;&nbsp;&lt;init<sub>1</sub>&gt;)&nbsp;<tt>...</tt>),<p></tt>where each &lt;init&gt; is an expression, and &lt;body&gt; should be asequence of one or more expressions.  It isan error for a &lt;variable&gt; to appear more than once in the list of variablesbeing bound.<p><em>Semantics: </em>The &lt;init&gt;s are evaluated in the current environment (in someunspecified order), the &lt;variable&gt;s are bound to fresh locationsholding the results, the &lt;body&gt; is evaluated in the extendedenvironment, and the value(s) of the last expression of &lt;body&gt;is(are) returned.  Each binding of a &lt;variable&gt; has &lt;body&gt; as itsregion.<a name="%_idx_126"></a><p><tt><p>(let&nbsp;((x&nbsp;2)&nbsp;(y&nbsp;3))<br>&nbsp;&nbsp;(*&nbsp;x&nbsp;y))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;6<br><br>(let&nbsp;((x&nbsp;2)&nbsp;(y&nbsp;3))<br>&nbsp;&nbsp;(let&nbsp;((x&nbsp;7)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(z&nbsp;(+&nbsp;x&nbsp;y)))<br>&nbsp;&nbsp;&nbsp;&nbsp;(*&nbsp;z&nbsp;x)))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;35<p></tt><p>See also named <tt>let</tt>, section <a href="#%_sec_4.2.4">4.2.4</a>.<p><p><p><p><div align=left><u>library syntax:</u>&nbsp;&nbsp;<tt>(<a name="%_idx_128"></a>let*<i> &lt;bindings&gt; &lt;body&gt;</i>)</tt>&nbsp;</div><p><em>Syntax: </em>&lt;Bindings&gt; should have the form<tt><p>((&lt;variable<sub>1</sub>&gt;&nbsp;&lt;init<sub>1</sub>&gt;)&nbsp;<tt>...</tt>),<p></tt>and &lt;body&gt; should be a sequence ofone or more expressions.<p><em>Semantics: </em><tt>Let*</tt> is similar to <tt>let</tt>, but the bindings are performedsequentially from left to right, and the region<a name="%_idx_130"></a> of a binding indicatedby <tt>(&lt;variable&gt; &lt;init&gt;)</tt> is that part of the <tt>let*</tt>expression to the right of the binding.  Thus the second binding is donein an environment in which the first binding is visible, and so on.<p><tt><p>(let&nbsp;((x&nbsp;2)&nbsp;(y&nbsp;3))<br>&nbsp;&nbsp;(let*&nbsp;((x&nbsp;7)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(z&nbsp;(+&nbsp;x&nbsp;y)))<br>&nbsp;&nbsp;&nbsp;&nbsp;(*&nbsp;z&nbsp;x)))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;70<p></tt><p><p><p><p><div align=left><u>library syntax:</u>&nbsp;&nbsp;<tt>(<a name="%_idx_132"></a>letrec<i> &lt;bindings&gt; &lt;body&gt;</i>)</tt>&nbsp;</div><p><em>Syntax: </em>&lt;Bindings&gt; should have the form<tt><p>((&lt;variable<sub>1</sub>&gt;&nbsp;&lt;init<sub>1</sub>&gt;)&nbsp;<tt>...</tt>),<p></tt>and &lt;body&gt; should be a sequence ofone or more expressions. It is an error for a &lt;variable&gt; to appear morethan once in the list of variables being bound.<p><em>Semantics: </em>The &lt;variable&gt;s are bound to fresh locations holding undefinedvalues, the &lt;init&gt;s are evaluated in the resulting environment (insome unspecified order), each &lt;variable&gt; is assigned to the resultof the corresponding &lt;init&gt;, the &lt;body&gt; is evaluated in theresulting environment, and the value(s) of the last expression in&lt;body&gt; is(are) returned.  Each binding of a &lt;variable&gt; has theentire <tt>letrec</tt> expression as its region<a name="%_idx_134"></a>, making it possible todefine mutually recursive procedures.<p><tt><p>(letrec&nbsp;((even?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(lambda&nbsp;(n)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(zero?&nbsp;n)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<tt>#t</tt><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(odd?&nbsp;(-&nbsp;n&nbsp;1)))))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(odd?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(lambda&nbsp;(n)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(zero?&nbsp;n)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<tt>#f</tt><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(even?&nbsp;(-&nbsp;n&nbsp;1))))))<br>&nbsp;&nbsp;(even?&nbsp;88))&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===&gt;&nbsp;&nbsp;<tt>#t</tt><p></tt><p>One restriction on <tt>letrec</tt> is very important: it must be possibleto evaluate each &lt;init&gt; without assigning or referring to the value of any

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -