user> (bean "test")

{:bytes #object["[B" 0x546fe214 "[B@546fe214"], :class java.lang.String, :empty 
false}


user> (into [] (bean "test"))

[[:bytes #object[clojure.core$bean$fn__5742$fn__5743 0x4cdc53ad 
"clojure.core$bean$fn__5742$fn__5743@4cdc53ad"]] [:class 
#object[clojure.core$bean$fn__5742$fn__5743 0x55008929 
"clojure.core$bean$fn__5742$fn__5743@55008929"]] [:empty 
#object[clojure.core$bean$fn__5742$fn__5743 0x118e7d04 
"clojure.core$bean$fn__5742$fn__5743@118e7d04"]]]

This is certainly very puzzling behavior but if you look at the type of (bean 
"test") it becomes clearer:

user> (type (bean "test"))
clojure.core.proxy$clojure.lang.APersistentMap$ff19274a

So we need to "force" the map to a sequence in order to pour it into a vector, 
it seems:

user> (into [] (seq (bean "test")))
[[:bytes #object["[B" 0x15cb34dd "[B@15cb34dd"]] [:class java.lang.String] 
[:empty false]]

Whether that is "correct" or not, I’ll leave to Clojure/core to comment…

Sean


-- 
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/d/optout.

Reply via email to