Clojure is an open source programming language created in 2007 by Rich Hickey.
git clone https://github.com/clojure/clojure
#39on PLDB | 16Years Old | 82kRepos |
Clojure ( , like "closure") is a dialect of the Lisp programming language. Clojure is a general-purpose programming language with an emphasis on functional programming. It runs on the Java virtual machine and the Common Language Runtime. Read more on Wikipedia...
(println "Hello, world!")
(println "Hello World")
; Hello world in Clojure
(defn hello []
(println "Hello world!"))
(hello)
(defn rand
"Returns a random floating point number between 0 (inclusive) and
n (default 1) (exclusive)."
([] (scm* [n] (random-real)))
([n] (* (rand) n)))
;; A typical entry point of a Clojure program:
;; `-main` function
(defn -main ; name
[& args] ; (variable) parameters
(println "Hello, World!")) ; body