Defining a Function
(defn functionname “optional documentation string” [arguments] (code block))
Example
(ns clojure.examples.hello (:gen-class)) ;; This program displays Hello World (defn Example [] (def x 1) (def y 1.25) (def str1 "Hello") (println x) (println y) (println str1)) (Example)
Output
1 1.25 Hello