Re: Unexpected conj behavior

2010-06-15 Thread Chouser
On Mon, Jun 14, 2010 at 11:06 AM, Sean Devlin francoisdev...@gmail.com wrote: This behavior becomes a pain when trying to use into: ;Good user= (into {} [[:a 1] [:b 2] [:c 3] [:d 4]]) {:a 1, :b 2, :c 3, :d 4} ;Bad user= (into {} (partition 2 [:a 1 :b 2 :c 3 :d 4])) #CompilerException

Unexpected conj behavior

2010-06-14 Thread Sean Devlin
Okay, I was doing some quick experiments with conj today, and I stumbled across the following behavior. The first step works great. user= (conj {} [:a 1]) {:a 1} Then I hit some different casting errors: user= (conj {} (seq [:a 1])) #CompilerException java.lang.ClassCastException:

Re: Unexpected conj behavior

2010-06-14 Thread Stuart Sierra
On Jun 14, 11:06 am, Sean Devlin francoisdev...@gmail.com wrote: ;Bad user= (into {} (partition 2 [:a 1 :b 2 :c 3 :d 4])) This can, of course, be (into {} (map vec (partition 2 [:a 1 :b 2 :c 3 :d 4]))) I think the requirement is that the argument to APersistentMap.conj should implement