variadic functions
; The beginning of the variable parameters is marked with &
(defn test [& opts]
(prn opts))
(test "hello" "world")
;=> ("hello" "world")
; from clojure 1.11 it supports keyword arguments
(defn test2 [& {:keys [a b] :as opts}]
(prn a b opts))
(test2 :a 1)
;=> 1 nil {:a 1}
(test2 {:a 1 :b 2})
;=> 1 2 {:a 1, :b 2}