Skip to content

Instantly share code, notes, and snippets.

@vu3rdd
Created April 17, 2010 12:11
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 vu3rdd/369502 to your computer and use it in GitHub Desktop.
Save vu3rdd/369502 to your computer and use it in GitHub Desktop.
(def d {:name "Ram", :job "Engineer", :age 16})
;=> #'user/d
(:name d)
;=> "Ram"
;; we don't have location as a key in the map
(:location d)
;=> nil
;; You can give a default value to return (as a third parameter)
;; if the key is not found in the map
(:location d "Bangalore")
;=> "Bangalore"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment