Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Execute Clojure Online

(ns clojure.examples.hello
	(:gen-class))

(defn hello-world [username]
(println (format "Hello, %s" username)))

(hello-world "world")

(defn addition [x]
(println (+ x, 4)))

(addition 2)

(defn testIf [y]
(if (> y 2)
  (println "joe")
  (println "king")))
  
(testIf 1)

(defn tesLlist  [coll ] 
 (println (reduce + coll )))
 

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.