这是我的问题:
每次打开新的repl时,我需要运行一些代码。在谷歌上搜索后,我发现可以使用文件
这是我需要运行的代码:
init.clj
或者(使用Leiningen)user.clj
来实现。这是我需要运行的代码:
(set! *print-length* 103)
(println "hello")
(println *print-length*)
这是两个文件的结果:
[~/project]$ lein repl
hello <- this is the println, so the file is excecuted
103 <- this is the println of *print-length* apparently change
REPL started; server listening on localhost port 20875
user=> *print-length*
nil <- but the val of *print-length* don't change
我需要做些什么或者我有错误吗?
感谢所有人!