diff options
| author | Joel Martin <github@martintribe.org> | 2014-04-15 01:24:43 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-04-15 01:24:43 -0500 |
| commit | 7e9a2883fe5c25a521b1dc37e4c549e1ed508ece (patch) | |
| tree | b444224dae6db978d4b5902f2a5b37046ba40d3e /js | |
| parent | a2849f89e7892feee256169398b1d2d82a2b8231 (diff) | |
| download | mal-7e9a2883fe5c25a521b1dc37e4c549e1ed508ece.tar.gz mal-7e9a2883fe5c25a521b1dc37e4c549e1ed508ece.zip | |
All: fix get. All pass stepA tests.
Diffstat (limited to 'js')
| -rw-r--r-- | js/core.js | 2 | ||||
| -rw-r--r-- | js/step2_eval.js | 1 | ||||
| -rw-r--r-- | js/step3_env.js | 1 | ||||
| -rw-r--r-- | js/step4_if_fn_do.js | 1 |
4 files changed, 4 insertions, 1 deletions
@@ -51,7 +51,7 @@ function dissoc(src_hm) { } function get(hm, key) { - if (key in hm) { + if (hm != null && key in hm) { return hm[key]; } else { return null; diff --git a/js/step2_eval.js b/js/step2_eval.js index f111a58..adcefe5 100644 --- a/js/step2_eval.js +++ b/js/step2_eval.js @@ -32,6 +32,7 @@ function eval_ast(ast, env) { } function _EVAL(ast, env) { + //printer.println("EVAL:", types._pr_str(ast, true)); if (!types._list_Q(ast)) { return eval_ast(ast, env); } diff --git a/js/step3_env.js b/js/step3_env.js index 1000437..86981d2 100644 --- a/js/step3_env.js +++ b/js/step3_env.js @@ -33,6 +33,7 @@ function eval_ast(ast, env) { } function _EVAL(ast, env) { + //printer.println("EVAL:", types._pr_str(ast, true)); if (!types._list_Q(ast)) { return eval_ast(ast, env); } diff --git a/js/step4_if_fn_do.js b/js/step4_if_fn_do.js index 0bf988d..a80190e 100644 --- a/js/step4_if_fn_do.js +++ b/js/step4_if_fn_do.js @@ -34,6 +34,7 @@ function eval_ast(ast, env) { } function _EVAL(ast, env) { + //printer.println("EVAL:", types._pr_str(ast, true)); if (!types._list_Q(ast)) { return eval_ast(ast, env); } |
