gpt4 book ai didi

clojure - 有没有办法将 REPLY 设置为始终打印?

转载 作者:行者123 更新时间:2023-12-03 16:54:26 26 4
gpt4 key购买 nike

我发现自己经常以 pprint 的方式包装表达式。有些东西告诉我有一个选项可以自动执行此操作,但我找不到它。所以,而不是输入这个:

(pprint list-of-maps)

我只想输入
list-of-maps

在 REPL 中并获得 pretty-print 输出。

最佳答案

只需使用

(clojure.main/repl :print pprint)

找到 here .

来自 docs :

repl clojure.main

(repl & options)
...
- :print, function of one argument, prints its argument to the output default: prn
...

关于clojure - 有没有办法将 REPLY 设置为始终打印?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18251139/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com