Функции

;; a default value cannot be written in the parameter list.
;; instead a function gets several arities, and the short one calls the long one
(defn say-goodbye
  ([] (say-goodbye "Goodbye!"))
  ([message] (println message)))

(say-goodbye)
;; prints "Goodbye!"
(say-goodbye "see you")
;; prints "see you"

;; named options with defaults: :or fills in what the caller omitted
(defn greet [name & {:keys [greeting] :or {greeting "Hello"}}]
  (println (str greeting ", " name "!")))

(greet "Ann")
;; prints "Hello, Ann!"
(greet "Bob" :greeting "Hi")
;; prints "Hi, Bob!"