Such as:
(println clojure-version)
?
To start a REPL session in Eclipse, click the Menu option, go to Run As → Clojure Application. This will start a new REPL session in a separate window along with the console output. Conceptually, REPL is similar to Secure Shell (SSH).
Create a new Clojure project with Leiningen. Build the project to create an executable JAR file. Execute the JAR file. Execute code in a Clojure REPL.
main namespace. The clojure. main namespace provides functions that allow Clojure programs and interactive sessions to be launched via Java's application launcher tool java .
You can just press ctrl-d (*nix) or ctrl-z (Windows) to exit the REPL.
Even shorter :
user> (clojure-version) "1.2.0-beta1" user>
Oops, I have to upgrade...
Very close.
user> (println *clojure-version*) {:major 1, :minor 2, :incremental 0, :qualifier } nil
Most builtin "global" variables like this have Common Lisp-style asterisk "earmuffs".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With