Explorar o código

fix interp-Ldyn

Jeremy G. Siek hai 1 ano
pai
achega
d4f1bc6ff3
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      book.tex

+ 2 - 2
book.tex

@@ -26,7 +26,7 @@
 
 
 \def\racketEd{0}
 \def\racketEd{0}
 \def\pythonEd{1}
 \def\pythonEd{1}
-\def\edition{1}
+\def\edition{0}
 
 
 % material that is specific to the Racket edition of the book
 % material that is specific to the Racket edition of the book
 \newcommand{\racket}[1]{{\if\edition\racketEd{#1}\fi}}
 \newcommand{\racket}[1]{{\if\edition\racketEd{#1}\fi}}
@@ -18680,7 +18680,7 @@ length of the vector.
 (define ((interp-Ldyn-exp env) ast)
 (define ((interp-Ldyn-exp env) ast)
   (define recur (interp-Ldyn-exp env))
   (define recur (interp-Ldyn-exp env))
   (match ast
   (match ast
-    [(Var x) (dict-ref env x)]
+    [(Var x) (unbox (lookup x env)]
     [(Int n) (Tagged n 'Integer)]
     [(Int n) (Tagged n 'Integer)]
     [(Bool b) (Tagged b 'Boolean)]
     [(Bool b) (Tagged b 'Boolean)]
     [(Lambda xs rt body)
     [(Lambda xs rt body)