Skip to content

Instantly share code, notes, and snippets.

@adam-e-trepanier
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adam-e-trepanier/cac11fa98ac4d1422735 to your computer and use it in GitHub Desktop.
Save adam-e-trepanier/cac11fa98ac4d1422735 to your computer and use it in GitHub Desktop.
Restructuring with prefix
;; In Clojure 1.6 we can now prefix the name of a key if its the same
;; A litte more context with the prefix, but still very clean
(let [{:keys [name date-of-birth orders
shipping-address/street shipping-address/city
shipping-address/state shipping-address/postal-code]
:as patient} data]
(println name \- date-of-birth)
(println street ", " city ", " state " " postal-code)
(println orders)
(println "------- Full Patient Deatils -----")
(println patient))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment