Hello World Program in Clojure
(defn -main (println "Hello World!"))
Clojure is based on Lisp, and it uses more or less the same Lisp syntax.
(defn) defines the
with one expression
(println "Hello World!"),
which is a function call
with a string argument
In functional programming languages like Clojure, everything is an expression. There are no statements in Clojure.
If you run this program, you will get the following output, as expected:
If you are interested in learning Clojure programming, then you can set up a development environment before continuing.
- Next Step: Clojure development environment setup