Skip to content

Commit 13a93db

Browse files
committed
change Apply to Call in python version
1 parent c2f509e commit 13a93db

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

book.tex

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
\def\racketEd{0}
2828
\def\pythonEd{1}
29-
\def\edition{1}
29+
\def\edition{0}
3030

3131
% material that is specific to the Racket edition of the book
3232
\newcommand{\racket}[1]{{\if\edition\racketEd{#1}\fi}}
@@ -15947,14 +15947,21 @@ \section{Explicate Control and the \LangCFun{} Language}
1594715947
\racket{\code{Apply}}\python{\code{Call}} and \code{FunRef} and the
1594815948
function for predicate context should be updated for
1594915949
\racket{\code{Apply}}\python{\code{Call}} but not \code{FunRef}. (A
15950-
\code{FunRef} cannot be a Boolean.) In assignment and predicate
15951-
contexts, \code{Apply} becomes \code{Call}\racket{, whereas in tail position
15952-
\code{Apply} becomes \code{TailCall}}. We recommend defining a new
15953-
auxiliary function for processing function definitions. This code is
15954-
similar to the case for \code{Program} in \LangVec{}. The top-level
15955-
\code{explicate\_control} function that handles the \code{ProgramDefs}
15956-
form of \LangFun{} can then apply this new function to all the
15957-
function definitions.
15950+
\code{FunRef} cannot be a Boolean.)
15951+
15952+
In assignment and predicate contexts,
15953+
%
15954+
\racket{\code{Apply} becomes \code{Call}, whereas
15955+
in tail position \code{Apply} becomes \code{TailCall}}
15956+
%
15957+
\python{\code{Call} remains \code{Call}, whereas
15958+
in tail position \code{Call} becomes \code{TailCall}}.
15959+
%
15960+
We recommend defining a new auxiliary function for processing function
15961+
definitions. This code is similar to the case for \code{Program} in
15962+
\LangVec{}. The top-level \code{explicate\_control} function that
15963+
handles the \code{ProgramDefs} form of \LangFun{} can then apply this
15964+
new function to all the function definitions.
1595815965

1595915966
{\if\edition\pythonEd\pythonColor
1596015967

0 commit comments

Comments
 (0)