浏览代码

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 年之前
父节点
当前提交
aa7483fee8
共有 1 个文件被更改,包括 3 次插入3 次删除
  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.}