On Dec 18, 2:30 pm, Chris Kent <cjk...@gmail.com> wrote:
> Hi
>
> I've been playing around using symbols with metadata as struct map
> keys after reading this 
> message:http://groups.google.com/group/clojure/msg/68e7036dbd8ded29
>
> It all works OK except when you use find to extract an entry.  find
> returns an entry containing the key passed to it, not the key in the
> map.  So if you don't use the original key to query the map you don't
> get the metadata:
>
> user=> (defstruct s (with-meta 'k {:a "A"}))
> #'user/s
> user=> (def s1 (struct s 1))
> #'user/s1
> user=> ^(first (keys s1))
> {:a "A"}
> user=> (find s1 'k)
> [k 1]
> user=> ^(first (find s1 'k))
> nil
>

Fixed (svn 1175) - thanks for the report.

Rich


--~--~---------~--~----~------------~-------~--~----~
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
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to