aboutsummaryrefslogtreecommitdiff
path: root/python/step6_file.py
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-04-01 23:12:33 -0500
committerJoel Martin <github@martintribe.org>2014-04-01 23:12:33 -0500
commit1617910ad342a55762f3ddabb975849d843cff85 (patch)
tree7d5ec5c3865370fa3cf477b772a79a7b9c6dc109 /python/step6_file.py
parent7e872ecfc0b00c3675d64b748a5f1e8754c85b7e (diff)
downloadmal-1617910ad342a55762f3ddabb975849d843cff85.tar.gz
mal-1617910ad342a55762f3ddabb975849d843cff85.zip
All: remove slurp-do, use str around slurp instead.
Diffstat (limited to 'python/step6_file.py')
-rw-r--r--python/step6_file.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/python/step6_file.py b/python/step6_file.py
index b53863a..8a3432d 100644
--- a/python/step6_file.py
+++ b/python/step6_file.py
@@ -88,11 +88,10 @@ for name, val in types_ns.items(): _ref(name, val)
_ref('read-string', read_str)
_ref('eval', lambda ast: EVAL(ast, repl_env))
_ref('slurp', lambda file: open(file).read())
-_ref('slurp-do', lambda file: "(do" + open(file).read() + ")")
# Defined using the language itself
REP("(def! not (fn* (a) (if a false true)))")
-REP("(def! load-file (fn* (f) (eval (read-string (slurp-do f)))))")
+REP("(def! load-file (fn* (f) (eval (read-string (str \"(do \" (slurp f) \")\")))))")
if len(sys.argv) >= 2:
REP('(load-file "' + sys.argv[1] + '")')