Last active
August 29, 2015 14:07
-
-
Save adam-e-trepanier/cac11fa98ac4d1422735 to your computer and use it in GitHub Desktop.
Restructuring with prefix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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