☆ Yσɠƚԋσʂ ☆M to Clojure programming language discussion · 3 years agoClojure - Clojure 1.11.0 releaseclojure.orgexternal-linkmessage-square4fedilinkarrow-up12arrow-down10
arrow-up12arrow-down1external-linkClojure - Clojure 1.11.0 releaseclojure.org☆ Yσɠƚԋσʂ ☆M to Clojure programming language discussion · 3 years agomessage-square4fedilink
minus-squarevi21linkfedilinkarrow-up2·3 years agoI didn’t know that I can do this in 1.10. (defn f [& {:keys [a b]}] (println "A" a " B" b))
minus-square☆ Yσɠƚԋσʂ ☆OPMlinkfedilinkarrow-up2·3 years agooh yeah this kind destructuring was a available for a while, although it’s generally better to just pass a map I find.
minus-squarevi21linkfedilinkarrow-up2·3 years agoI always defined a function like below and passed a map. (defn f [{:keys [a b]}] (println a b)) So now I have choices.
I didn’t know that I can do this in 1.10.
oh yeah this kind destructuring was a available for a while, although it’s generally better to just pass a map I find.
I always defined a function like below and passed a map.
(defn f [{:keys [a b]}] (println a b))
So now I have choices.
yup :)