Классы

; Clojure has no static members: a namespace holds the values and functions

; type constant
(def max-connections 3)

; type "fields"
(def host (atom "10.0.0.1"))
(def port (atom 0))

; type "method"
(defn get-connection [] (str @host ":" @port))

(reset! port 52)
(println (get-connection))  ; 10.0.0.1:52

(reset! host "10.0.0.3")
(println (get-connection))  ; 10.0.0.3:52
(println max-connections)