quote + #^ bug?

5 views
Skip to first unread message

Stephen Wrobleski

unread,
Nov 4, 2008, 8:24:58 PM11/4/08
to clo...@googlegroups.com
On rev 1086:

user=> (meta `#^mmm sss)
{:tag user/mmm}

user=> (def obj '#^mmm sss)
#=(var user/obj)
user=> (meta obj)
{:tag mmm}


; Okay.. However, this is not what I'd expect:

user=> (meta '#^mmm sss)
nil


Seems like the metadata doesn't carry through the quote? (but for some
reason, does so when on the RHS of a def)


Regards,
Steve

wwmorgan

unread,
Nov 5, 2008, 12:22:42 PM11/5/08
to Clojure
I don't know why you're getting this behavior, but you can do what you
want by using with-meta instead of #^

user=> (meta (with-meta 'sss {:tag 'mmm}))
{:tag mmm}
Reply all
Reply to author
Forward
0 new messages