https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/APersistentMap.java#L24
The implementation assumes you're attempting to conj one of the following 3
things into the hash map:
1. A MapEntry object
2. A vector of the format [key value]
3. A seq of MapEntry objects
On Jun 25, 2013, at 15:03 , Michael-Keith Bernard (SegFaultAX)
mkbernard@gmail.com wrote:
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/APersistentMap.java#L24
The implementation assumes you're attempting to conj one of the following 3
things into the hash map:
Why does `into` fail when the 2-element collections are lists and not
vectors? :
~~~
user= (into {} [[:a 1] [:b 2]])
{:a 1, :b 2}
user= (into {} ['(:a 1) '(:b 2)])
ClassCastException clojure.lang.Keyword cannot be cast to
java.util.Map$Entry clojure.lang.ATransientMap.conj
On Mon, Jun 24, 2013 at 8:49 AM, John Gabriele jmg3...@gmail.com wrote:
Why does `into` fail when the 2-element collections are lists and not
vectors? :
Because the implementation special cases vectors :)
It's the one place where a two element vector is treated like a
Map$Entry so that you are
On Monday, June 24, 2013 12:14:56 PM UTC-4, Sean Corfield wrote:
On Mon, Jun 24, 2013 at 8:49 AM, John Gabriele
jmg...@gmail.comjavascript:
wrote:
Why does `into` fail when the 2-element collections are lists and not
vectors? :
Because the implementation special cases vectors :)
On Jun 24, 2013, at 11:14 , Sean Corfield seancorfi...@gmail.com wrote:
On Mon, Jun 24, 2013 at 8:49 AM, John Gabriele jmg3...@gmail.com wrote:
Why does `into` fail when the 2-element collections are lists and not
vectors? :
Because the implementation special cases vectors :)
It's the