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

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -