Jeremy Siek 9 anni fa
parent
commit
5bdd89be0a
1 ha cambiato i file con 10 aggiunte e 10 eliminazioni
  1. 10 10
      book.tex

+ 10 - 10
book.tex

@@ -679,15 +679,15 @@ our compiler will translate it into the program
 \end{lstlisting}
 \end{lstlisting}
 
 
 Figure~\ref{fig:pe-arith} gives the code for a simple partial
 Figure~\ref{fig:pe-arith} gives the code for a simple partial
-evaluator for the $R_0$ language. The output of the partial
-evaluator is an $R_0$ program, which we build up using a
-combination of quasiquotes and commas. (Though no quasiquote is
-necessary for integers.) In Figure~\ref{fig:pe-arith}, the normal
-structural recursion is captured in the main \texttt{pe-arith}
-function whereas the code for partially evaluating negation and
-addition is factored out the into two separate helper functions:
-\texttt{pe-neg} and \texttt{pe-add}. The input to these helper
-functions is the output of partially evaluating the children nodes.
+evaluator for the $R_0$ language. The output of the partial evaluator
+is an $R_0$ program, which we build up using a combination of
+quasiquotes and commas. (Though no quasiquote is necessary for
+integers.) In Figure~\ref{fig:pe-arith}, the normal structural
+recursion is captured in the main \texttt{pe-arith} function whereas
+the code for partially evaluating negation and addition is factored
+into two separate helper functions: \texttt{pe-neg} and
+\texttt{pe-add}. The input to these helper functions is the output of
+partially evaluating the children nodes.
 
 
 \begin{figure}[tbp]
 \begin{figure}[tbp]
 \begin{lstlisting}
 \begin{lstlisting}
@@ -721,7 +721,7 @@ input program. That is, we can test whether it satisfies Diagram
 evaluator on several examples and tests the output program.  The
 evaluator on several examples and tests the output program.  The
 \texttt{assert} function is defined in Appendix~\ref{appendix:utilities}.
 \texttt{assert} function is defined in Appendix~\ref{appendix:utilities}.
 \begin{lstlisting}
 \begin{lstlisting}
-(define (test-pe pe p)
+(define (test-pe p)
   (assert "testing pe-arith"
   (assert "testing pe-arith"
      (equal? (interp-R0 p) (interp-R0 (pe-arith p)))))
      (equal? (interp-R0 p) (interp-R0 (pe-arith p)))))