view src/rlm/println.clj @ 3:c8e35134bf8e

working on qotd.
author Robert McIntyre <rlm@mit.edu>
date Wed, 18 Jan 2012 05:18:57 -0700
parents 78a630e650d2
children
line wrap: on
line source
1 (ns rlm.println)
4 (def println-repl (bound-fn [& args] (apply println args)))
8 (defn println-terminal [& more]
9 (.println System/out (apply str more)))
12 (defmacro print-to-repl [& forms]
13 `(binding [clojure.core/*out*
14 (java.io.PrintWriter. (clojure.java.io/writer System/out))]
15 ~@forms))