Creating a map from a var in Clojure

Viewed 737

How does one create a map from a var in Clojure?

For example, if one has a var called 'var', as follows:

(def var "I am a var")

And then, one wants to convert it to the following:

{:var "I am a var"}

How does one achieve that?

By the way, just to be clear: I want the f from (f var) where 'f' converts var to {:var "I am a var"}.

3 Answers
Related