clojure - Can I look up a string key in a hashmap with convenient syntax? -
Being able to use the I define In the shortest way I How can I see a string key? Is there a single way or is there any magic? key (def my-hashmap {: 1}} is very convenient. Sometimes I have hashpes that are string values I
(def my-hashmap { "One"}} with syntax
("one" my-hashmap) . Obviously, I can not do my options either in the
Use (my-hamspap "one") Get To change hashmap, there are symbols of keys for this, I would not want to, because I will pass the object to another function which can expect that it is in the original format.
map can be used as a function
(my-hashmap "one")
Comments
Post a Comment