Skip to content

Instantly share code, notes, and snippets.

@ponkore
Created October 26, 2016 11:33
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 ponkore/86c54e009e3c179b825555d45a3c7666 to your computer and use it in GitHub Desktop.
Save ponkore/86c54e009e3c179b825555d45a3c7666 to your computer and use it in GitHub Desktop.
名前空間付きキーワードを持つ map の binding
;;
;; keyword with namespace
;;
(let [{:keys [app/title]} {:app/title "aabb"}] title)
;; => "aabb"
(let [{:keys [a.p.p/title]} {:a.p.p/title "aabb"}] title)
;; => "aabb"
(let [{:keys [a.p.p/title]} {:a.p.p/title "aabb"}] title)
;; => "aabb"
(let [{:keys [a.p.p/title]} {:title "aabb"}] title)
;; => nil
(let [{:keys [title]} {:a.p.p/title "aabb"}] title)
;; => nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment