You need (var x) instead of x in your println function also:

(println (= (-> (var x) meta :meta-test) "test"))

Or you can use #'x instead of (var x) as such:
(println (= (-> #'x meta :meta-test) "test"))

#' is a reader macro which expands to (var arg).


On Friday, October 16, 2015 at 6:58:19 PM UTC+3, Anton Kozhin wrote:
> I try next code in clojurescript version 1.7.122
> 
> (def x)
> (alter-meta! (var x) assoc :meta-test "test")
> (println (= (-> x meta :meta-test) "test"))
> =>false
> 
> Thanks,
> 
> Anton

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to