欢迎!请查看关于页面以了解更多关于此如何运作的信息。
我认为添加一个宏,将标准输出重定向到*err*将很有用。
*err*
(with-err-out [& body] `(binding [*out* *err*] ~@body))
反驳观点:(with-err-out (do-stuff))与(binding [*out* *err*] (do-stuff))几乎一样长,也不易读。
(with-err-out (do-stuff))
(binding [*out* *err*] (do-stuff))