欢迎!请查看关于页面,以了解有关此功能的更多信息。
我认为添加一个宏将标准输出重定向到 *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))