(defn greetings [msg] (println (format "Hello, %s" msg))) (greetings "World!")
Write, Run & Share Clojure code online using OneCompiler's Clojure online compiler for free. It's one of the robust, feature-rich online compilers for Clojure language, Getting started with the OneCompiler's Clojure editor is easy and fast. The editor shows sample boilerplate code when you choose language as Clojure and start coding.
OneCompiler's Clojure online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample Clojure program which takes name as input and prints hello message with your name.
(println "Hello" (read-line))
Clojure is a dialect of Lisp and a dynamic general-purpose programming language
(def var-name var-value)
(while(expression)
(do
statements))
(doseq (sequence)
statement)
(dotimes (variable value)
statements)
loop [binding]
(condition
(statement)
(recur (binding)))
(defn function-name [parameters] (codeblock) )
(fn [parameters] (codeblock) )