Skip to content

Instantly share code, notes, and snippets.

@adam-e-trepanier
Created October 20, 2014 21:55
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/2383227e043d93c68923 to your computer and use it in GitHub Desktop.
Save adam-e-trepanier/2383227e043d93c68923 to your computer and use it in GitHub Desktop.
Restructuring with auto resolve
;; In Clojure 1.6 we can now also auto resolve keyword forms in the :keys directive
;; I think you lose some context with auto-resolve, but its the shortest code
(let [{:keys [name date-of-birth orders
::street ::city ::state ::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