Mercurial > rlm
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:78a630e650d2 |
---|---|
1 (ns rlm.println) | |
2 | |
3 | |
4 (def println-repl (bound-fn [& args] (apply println args))) | |
5 | |
6 | |
7 | |
8 (defn println-terminal [& more] | |
9 (.println System/out (apply str more))) | |
10 | |
11 | |
12 (defmacro print-to-repl [& forms] | |
13 `(binding [clojure.core/*out* | |
14 (java.io.PrintWriter. (clojure.java.io/writer System/out))] | |
15 ~@forms)) | |
16 |