From d7f5c287ebdd8794eac70eb60f543d4ce980266a Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Mon, 6 Dec 2021 08:36:30 -0800 Subject: [PATCH] Fix bugs --- lisp.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp.js b/lisp.js index 961165f..bbef7e9 100755 --- a/lisp.js +++ b/lisp.js @@ -51,7 +51,7 @@ function Cdr(x) { if (x < 0) { return Get(x + 1); } else { - Throw(x + 1); + Throw(x); } } @@ -157,7 +157,7 @@ function Copy(x, m, k) { function Evlis(m, a) { return m ? Cons(Eval(Car(m), a), - Evlis(Cdr(m), a)) : 0; + Evlis(Cdr(m), a)) : m; } function Pairlis(x, y, a) { @@ -257,7 +257,6 @@ ReadChar() { dx = c; return t; } else { - PrintChar('\n'); exit(0); } }