Skip to content

Instantly share code, notes, and snippets.

@ykarikos
Created January 3, 2016 15:04
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 ykarikos/aed640acdce59f6e9784 to your computer and use it in GitHub Desktop.
Save ykarikos/aed640acdce59f6e9784 to your computer and use it in GitHub Desktop.
Accessing a map
user=> (def mymap {:foo 1 :bar {:subfirst 1.2 :subsecond "foo"}})
#'user/mymap
user=> (:foo mymap)
1
user=> (mymap :bar)
{:subfirst 1.2, :subsecond "foo"}
user=> (-> mymap :bar :subsecond)
"foo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment