diff options
Diffstat (limited to 'js/step3_env.js')
| -rw-r--r-- | js/step3_env.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/js/step3_env.js b/js/step3_env.js index 86981d2..7dbefc4 100644 --- a/js/step3_env.js +++ b/js/step3_env.js @@ -69,12 +69,11 @@ function PRINT(exp) { // repl var repl_env = new Env(); var rep = function(str) { return PRINT(EVAL(READ(str), repl_env)); }; -_ref = function (k,v) { repl_env.set(k, v); } -_ref('+', function(a,b){return a+b;}); -_ref('-', function(a,b){return a-b;}); -_ref('*', function(a,b){return a*b;}); -_ref('/', function(a,b){return a/b;}); +repl_env.set('+', function(a,b){return a+b;}); +repl_env.set('-', function(a,b){return a-b;}); +repl_env.set('*', function(a,b){return a*b;}); +repl_env.set('/', function(a,b){return a/b;}); if (typeof require === 'undefined') { // Asynchronous browser mode |
