Skip to content

Commit 75b7fb5

Browse files
committed
fix partial eval, issue #215
1 parent 93f9177 commit 75b7fb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

book.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
\def\racketEd{0}
2525
\def\pythonEd{1}
26-
\def\edition{0}
26+
\def\edition{1}
2727

2828
% material that is specific to the Racket edition of the book
2929
\newcommand{\racket}[1]{{\if\edition\racketEd{#1}\fi}}
@@ -1723,7 +1723,7 @@ \section{Example Compiler: A Partial Evaluator}
17231723
case BinOp(left, Add(), right):
17241724
return pe_add(pe_exp(left), pe_exp(right))
17251725
case BinOp(left, Sub(), right):
1726-
return pe_add(pe_exp(left), pe_neg(right))
1726+
return pe_add(pe_exp(left), pe_neg(pe_exp(right)))
17271727
case UnaryOp(USub(), v):
17281728
return pe_neg(pe_exp(v))
17291729
case Constant(value):

0 commit comments

Comments
 (0)