load-file: accept empty file or final comment, return nil
[jackhill/mal.git] / elixir / lib / mix / tasks / stepA_mal.ex
index 340be5a..b0eaf1e 100644 (file)
@@ -35,7 +35,7 @@ defmodule Mix.Tasks.StepAMal do
     read_eval_print("""
       (def! load-file
         (fn* (f)
-          (eval (read-string (str "(do " (slurp f) ")")))))
+          (eval (read-string (str "(do " (slurp f) "\nnil)")))))
       """, env)
 
     # cond