Mercurial > rlm
annotate src/rlm/println.clj @ 0:78a630e650d2
initial import
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 18 Oct 2011 00:57:08 -0700 |
parents | |
children |
rev | line source |
---|---|
rlm@0 | 1 (ns rlm.println) |
rlm@0 | 2 |
rlm@0 | 3 |
rlm@0 | 4 (def println-repl (bound-fn [& args] (apply println args))) |
rlm@0 | 5 |
rlm@0 | 6 |
rlm@0 | 7 |
rlm@0 | 8 (defn println-terminal [& more] |
rlm@0 | 9 (.println System/out (apply str more))) |
rlm@0 | 10 |
rlm@0 | 11 |
rlm@0 | 12 (defmacro print-to-repl [& forms] |
rlm@0 | 13 `(binding [clojure.core/*out* |
rlm@0 | 14 (java.io.PrintWriter. (clojure.java.io/writer System/out))] |
rlm@0 | 15 ~@forms)) |
rlm@0 | 16 |