From 1617910ad342a55762f3ddabb975849d843cff85 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Tue, 1 Apr 2014 23:12:33 -0500 Subject: All: remove slurp-do, use str around slurp instead. --- php/stepA_more.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'php/stepA_more.php') diff --git a/php/stepA_more.php b/php/stepA_more.php index cac80ed..dd004cf 100644 --- a/php/stepA_more.php +++ b/php/stepA_more.php @@ -179,15 +179,12 @@ _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("(defmacro! cond (fn* (& xs) (if (> (count xs) 0) (list 'if (first xs) (if (> (count xs) 1) (nth xs 1) (throw \"odd number of forms to cond\")) (cons 'cond (rest (rest xs)))))))"); rep("(defmacro! or (fn* (& xs) (if (empty? xs) nil (if (= 1 (count xs)) (first xs) `(let* (or_FIXME ~(first xs)) (if or_FIXME or_FIXME (or ~@(rest xs))))))))"); -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++) { -- cgit v1.2.3