How create dynamic var programmatically

2012-09-04 Thread mdzaebel
(intern *ns* 'a 0) creates a non-dynamic var. However, how do I create a dynamic one like (def ^:dynamic a) does? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new m

Create dynamic vars programmatically

2012-09-04 Thread mdzaebel
(doseq [s '(a b c)] (intern *ns* s 0)) creates non-dynamic var's. However, how could I produce *dynamic* var's. I tried with-meta but failed. In other words, what does (def ^:dynamic a) internally do? *Thanks in advance, Marc* -- You received this message because you are subscribed to the Goog

Re: Metadata on symbols differ with caret reader

2011-01-10 Thread mdzaebel
Hi Meikel, On 10 Jan., 01:09, Meikel Brandmeyer wrote: > Because 'o expands to (quote o) and you actually hint this list. You might > try (meta ' ^:k o). Very interesting, this works! I did not know that syntax and none of my books or the reader section of clojure.org mentioned it. Thanks a lo

Metadata on symbols differ with caret reader

2011-01-09 Thread mdzaebel
Hi, (meta ^:k []) --> {:tag :k} (meta ^:k 'o) --> nil (meta(with-meta 'o {:tag :k})) --> {:tag :v} Why doesn't the second line return the metadata? Thanks, Marc Using Clj 1.2 -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this gr