diff options
Diffstat (limited to 'python/step7_quote.py')
| -rw-r--r-- | python/step7_quote.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/python/step7_quote.py b/python/step7_quote.py index 1002613..de19c6d 100644 --- a/python/step7_quote.py +++ b/python/step7_quote.py @@ -63,11 +63,14 @@ def EVAL(ast, env): let_env = Env(env) for i in range(0, len(a1), 2): let_env.set(a1[i], EVAL(a1[i+1], let_env)) - return EVAL(a2, let_env) + ast = a2 + env = let_env + # Continue loop (TCO) elif "quote" == a0: return ast[1] elif "quasiquote" == a0: - return EVAL(quasiquote(ast[1]), env) + ast = quasiquote(ast[1]); + # Continue loop (TCO) elif "do" == a0: eval_ast(ast[1:-1], env) ast = ast[-1] |
