Given the map:
(def myMap {"a" 1 "b" 2 "c" 3 "d" 4 "e" 5 "f" 6})
I wish to use let to bind each key to each value. What is the most concise way to do this?
with myMap as declared, destructuring of string keys seems like the best bet:
(let [{:strs [a b c d e f]} myMap]
(println a b c d e f))
;=> 1 2 3 4 5 6
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With