aboutsummaryrefslogtreecommitdiff
path: root/php/step6_file.php
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 /php/step6_file.php
parent7e872ecfc0b00c3675d64b748a5f1e8754c85b7e (diff)
downloadmal-1617910ad342a55762f3ddabb975849d843cff85.tar.gz
mal-1617910ad342a55762f3ddabb975849d843cff85.zip
All: remove slurp-do, use str around slurp instead.
Diffstat (limited to 'php/step6_file.php')
-rw-r--r--php/step6_file.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/php/step6_file.php b/php/step6_file.php
index 8e923e1..37ea3c6 100644
--- a/php/step6_file.php
+++ b/php/step6_file.php
@@ -110,13 +110,10 @@ _ref('eval', function($ast) {
_ref('slurp', function($f) {
return file_get_contents($f);
});
-_ref('slurp-do', function($f) {
- return "(do " . file_get_contents($f) . ")";
-});
// 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 (count($argv) > 1) {
for ($i=1; $i < count($argv); $i++) {