Clojure destructuring – Converting the rest of a sequence to a map

Destructuring also gives you the ability to interpret a sequence as a map:

(def my-vec [:a 1 :b 2])
(def my-lst '("smthg else" :c 3 :d 4))

(let [[& {:keys [a b]}] my-vec
      [s & {:keys [c d]} my-lst]
  (+ a b c d)) ;= 10

It is useful for defining functions with named parameters:

(defn my-func [a b & {:keys [c d] :or {c 3 d 4}}]
  (println a b c d))

(my-func 1 2) ;= 1 2 3 4
(my-func 3 4 :c 5 :d 6) ;= 3 4 5 6

if you want to reproduce, please indicate the source:
Clojure destructuring – Converting the rest of a sequence to a map - CodeDay