|
@@ -33,8 +33,8 @@
|
|
% would like a command for: \if\edition\racketEd\color{olive}
|
|
% would like a command for: \if\edition\racketEd\color{olive}
|
|
% and : \fi\color{black}
|
|
% and : \fi\color{black}
|
|
|
|
|
|
-%\newcommand{\pythonColor}[0]{\color{purple}}
|
|
|
|
-\newcommand{\pythonColor}[0]{}
|
|
|
|
|
|
+\newcommand{\pythonColor}[0]{\color{purple}}
|
|
|
|
+%\newcommand{\pythonColor}[0]{}
|
|
|
|
|
|
% material that is specific to the Python edition of the book
|
|
% material that is specific to the Python edition of the book
|
|
\newcommand{\python}[1]{{\if\edition\pythonEd\pythonColor #1\fi}}
|
|
\newcommand{\python}[1]{{\if\edition\pythonEd\pythonColor #1\fi}}
|
|
@@ -8918,7 +8918,7 @@ upcoming \code{explicate\_control} pass.
|
|
\begin{exercise}\normalfont\normalsize
|
|
\begin{exercise}\normalfont\normalsize
|
|
%
|
|
%
|
|
Add cases for Boolean constants and \code{if} to the \code{rco\_atom}
|
|
Add cases for Boolean constants and \code{if} to the \code{rco\_atom}
|
|
-and \code{rco\_exp} functions in \code{compiler.rkt}.
|
|
|
|
|
|
+and \code{rco\_exp} functions.
|
|
%
|
|
%
|
|
Create three new \LangIf{} programs that exercise the interesting
|
|
Create three new \LangIf{} programs that exercise the interesting
|
|
code in this pass.
|
|
code in this pass.
|
|
@@ -12217,7 +12217,7 @@ print(t[0] + t[2][0] if t[1] else 44)
|
|
\gray{\LwhileASTPython} \\ \hline
|
|
\gray{\LwhileASTPython} \\ \hline
|
|
\LtupASTPython \\
|
|
\LtupASTPython \\
|
|
\begin{array}{lcl}
|
|
\begin{array}{lcl}
|
|
- \LangLoopM{} &::=& \PROGRAM{\code{'()}}{\Stmt^{*}}
|
|
|
|
|
|
+ \LangVecM{} &::=& \PROGRAM{\code{'()}}{\Stmt^{*}}
|
|
\end{array}
|
|
\end{array}
|
|
\end{array}
|
|
\end{array}
|
|
\]
|
|
\]
|
|
@@ -18102,12 +18102,12 @@ def tail_sum(fvs_3:bot,n_0:int,s_1:int) -> int :
|
|
if n_0 == 0:
|
|
if n_0 == 0:
|
|
return s_1
|
|
return s_1
|
|
else:
|
|
else:
|
|
- return (let clos_2 = (tail_sum,)
|
|
|
|
- in clos_2[0](clos_2, n_0 - 1, n_0 + s_1))
|
|
|
|
|
|
+ return (begin: clos_2 = (tail_sum,)
|
|
|
|
+ clos_2[0](clos_2, n_0 - 1, n_0 + s_1))
|
|
|
|
|
|
def main() -> int :
|
|
def main() -> int :
|
|
- print((let clos_4 = (tail_sum,)
|
|
|
|
- in clos_4[0](clos_4, 3, 0)) + 36)
|
|
|
|
|
|
+ print((begin: clos_4 = (tail_sum,)
|
|
|
|
+ clos_4[0](clos_4, 3, 0)) + 36)
|
|
return 0
|
|
return 0
|
|
\end{lstlisting}
|
|
\end{lstlisting}
|
|
\fi}
|
|
\fi}
|