clj ## run this command in a terminal window
如果您已安裝 Leiningen,可以使用它來啟動 REPL
lein repl
您應該會看到以下類似的輸出
nREPL server started on port 64411 on host 127.0.0.1 - nrepl://127.0.0.1:64411
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.8.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_05-b13
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
user=>
如果您從 Leiningen 專案目錄中執行 lein repl
,專案的程式庫相依性和原始碼將會在 REPL 中可用。
如果您已安裝 Boot,可以使用它來啟動 REPL
boot repl
您應該會看到以下類似的輸出
nREPL server started on port 50109 on host 127.0.0.1 - nrepl://127.0.0.1:50109
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.9.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_05-b13
Exit: Control+D or (exit) or (quit)
Commands: (user/help)
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Find by Name: (find-name "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Examples from clojuredocs.org: [clojuredocs or cdoc]
(user/clojuredocs name-here)
(user/clojuredocs "ns-here" "name-here")
boot.user=>