I want to add meta-data to different items in a map, but I get an error in Clojure if I rry this with:
{:a
(with-meta
1
{:some-meta-tag "some-meta-data-value"}
)
}
: Is this possible?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I could be wrong, but think you can’t attach metadata to a number:
From the docs
“Symbols and collections support metadata, a map of data about the symbol or collection.”
This seemed to work:
And