Browse Source

Merge pull request #46 from onelharrison/fix-interp-R1-typo

Match on empty list instead of pattern variable in interp-R1 and uniquify
Jeremy G. Siek 4 năm trước cách đây
mục cha
commit
aa7483fee8
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      book.tex

+ 3 - 3
book.tex

@@ -1227,7 +1227,7 @@ environment with the result value bound to the variable, using
 
 (define (interp-R1 p)
   (match p
-    [(Program info e) ((interp-exp '()) e)]
+    [(Program '() e) ((interp-exp '()) e)]
     ))
 \end{lstlisting}
 \caption{Interpreter for the $R_1$ language.}
@@ -1908,8 +1908,8 @@ implement the clauses for variables and for the \key{let} form.
 
    (define (uniquify p)
      (match p
-       [(Program info e)
-        (Program info ((uniquify-exp '()) e))]
+       [(Program '() e)
+        (Program '() ((uniquify-exp '()) e))]
        )))
 \end{lstlisting}
 \caption{Skeleton for the \key{uniquify} pass.}