From 8cb5cda46cf3aef847ae3926dc53a5e5f87fe261 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Wed, 16 Apr 2014 23:57:50 -0500 Subject: All: move some fns to core. Major cleanup. - Don't import/require core until step4. - Define cond/or macros from step8 --- python/step5_tco.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'python/step5_tco.py') diff --git a/python/step5_tco.py b/python/step5_tco.py index 633cbd8..7982073 100644 --- a/python/step5_tco.py +++ b/python/step5_tco.py @@ -79,12 +79,11 @@ def PRINT(exp): repl_env = Env() def REP(str): return PRINT(EVAL(READ(str), repl_env)) -def _ref(k,v): repl_env.set(k, v) -# Import types functions -for name, val in core.ns.items(): _ref(name, val) +# core.py: defined using python +for k, v in core.ns.items(): repl_env.set(k, v) -# Defined using the language itself +# core.mal: defined using the language itself REP("(def! not (fn* (a) (if a false true)))") while True: -- cgit v1.2.3