On Wed, 2 Oct 2013 14:19:31 -0700 (PDT)
James Warren <jameswarr...@gmail.com> wrote:

> (defn foo [^Class c]
> ;; note: (into [] (keys (clojure.lang.Reflector/getStaticField c
> "dummyMap")))) works (keys (clojure.lang.Reflector/getStaticField c
> "dummyMap"))) 
> (def m (foo DummyClass))
> (println m)
> ;; (#<DummyEnum FIRST> #<DummyEnum SECOND> #<DummyEnum THIRD>)
> (println m)
> ;; (#<DummyEnum THIRD> #<DummyEnum THIRD> #<DummyEnum THIRD>)
> 
> Two different values upon successive calls using m.  Is this
> expected?  And if so, why?

If I see this correnctly, you use keys on a map which is just not
preserving the order of the elements.

Unless I am missing something, this behaviour is pretty much to be
expected.

regards,
Marek

-- 
-- 
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 members are moderated - please be patient with your 
first post.
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to