A function is defined by using the ‘defn’ macro. Following is the general syntax of the definition of a function.
(defn functionname “optional documentation string” [arguments] (code block))
Functions can have documentation strings, which is good to describe what the function actually does.
Following is a simple example of a function.
(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)
In the above example, the name of the function is Example.
1 1.25 Hello