clojure - Can I look up a string key in a hashmap with convenient syntax? -


Being able to use the key (def my-hashmap {: 1}} is very convenient. Sometimes I have hashpes that are string values ​​I

I define (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.

In the shortest way I How can I see a string key? Is there a single way or is there any magic?

map can be used as a function

  (my-hashmap "one")    

Comments

Popular posts from this blog

Out of index C/C++ -

regex - PatternSyntaxException: while using String.ReplaceAll function in java? -

java - Projects which are accessed via multiple (different) IDEs: Ant or Maven? -