Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. # Defining a Function <code> (defn functionname “optional documentation string” [arguments] (code block)) </code> ### Example <code> (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) </code> #### Output <code> 1 1.25 Hello </code> ## Refs - https://www.tutorialspoint.com/clojure/clojure_defining_a_function.htm open/defining-a-function.txt Last modified: 2024/10/05 06:15by 127.0.0.1