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