diff options
| author | Joel Martin <github@martintribe.org> | 2014-04-19 13:04:09 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-04-19 13:04:09 -0500 |
| commit | 86b689f3d7111a9fa13da389a30f3dfdf877d1a4 (patch) | |
| tree | d72b065f9f987e291f892ceee5a8640363bfd9df /clojure/src/step0_repl.clj | |
| parent | 718887c3019c49fc807bc18fbd5feb975ec03c85 (diff) | |
| download | mal-86b689f3d7111a9fa13da389a30f3dfdf877d1a4.tar.gz mal-86b689f3d7111a9fa13da389a30f3dfdf877d1a4.zip | |
All: *ARGV* and *host-language*. Misc syncing/fixes.
Diffstat (limited to 'clojure/src/step0_repl.clj')
| -rw-r--r-- | clojure/src/step0_repl.clj | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/clojure/src/step0_repl.clj b/clojure/src/step0_repl.clj index f6201dd..7a1a443 100644 --- a/clojure/src/step0_repl.clj +++ b/clojure/src/step0_repl.clj @@ -16,10 +16,12 @@ ;; repl (defn rep [strng] (PRINT (EVAL (READ strng), {}))) +;; repl loop +(defn repl-loop [] + (let [line (readline/readline "user> ")] + (when line + (println (rep line)) + (recur)))) (defn -main [& args] - (loop [] - (let [line (readline/readline "user> ")] - (when line - (println (rep line)) - (recur))))) + (repl-loop)) |
