I am trying to write a macro that takes a map as input, and that will quote every symbol that exists in that map (keys & values).
Here is what I would like to do. Let's say I have a macro quote-everything that take a map like this as input:
{foo "foo" :bar bar}
Then, evaluating:
(quote-everything {foo "foo" :bar bar})
Would produce:
{quote(foo) "foo" :bar quote(bar)}
Basically, I want the macro to generate a new map where every symbols are quoted. The problem is that I am don't know where to start, and if it is even possible. The thing is that the map can be anything, and the macro should support nested maps as well.
The detection of the symbols could be done using symbol?. However, to support nested maps the macro should probably call itself. But I have no idea how the new map should be created with such a macro.
Any pointers would be appreciated.