diff options
| author | Joel Martin <github@martintribe.org> | 2014-04-23 21:59:50 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-04-23 21:59:50 -0500 |
| commit | 6301e0b6374cecc5599665be14d6ddc6a31ce1e8 (patch) | |
| tree | dbf1dc2ff6c682fd87c72a7907e7f6e59c8d4c03 /python/step6_file.py | |
| parent | 89bd4de1e2704c1bc562788b2c5e4fc08b71a538 (diff) | |
| download | mal-6301e0b6374cecc5599665be14d6ddc6a31ce1e8.tar.gz mal-6301e0b6374cecc5599665be14d6ddc6a31ce1e8.zip | |
All: TCO let* and quasiquote.
Diffstat (limited to 'python/step6_file.py')
| -rw-r--r-- | python/step6_file.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/step6_file.py b/python/step6_file.py index 764eb53..9d84d1f 100644 --- a/python/step6_file.py +++ b/python/step6_file.py @@ -45,7 +45,9 @@ 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 "do" == a0: eval_ast(ast[1:-1], env) ast = ast[-1] |
