欢迎!有关本站的工作方式,请参阅关于页面获取更多信息。
我认为添加一个可以将标准输出重定向至 *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))