Классы / Конструкторы

(defrecord Man [name country])

;; ->Man takes the fields in the order they were declared
(def man (->Man "Alex" "Russia"))
;; (:name man) is "Alex"

;; map->Man takes them by name, in any order
(def other (map->Man {:country "Brazil" :name "Max"}))

(println "name is" (:name man) "country is" (:country man))
(println "name is" (:name other) "country is" (:country other))