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 (commonly created 
   via 
http://docs.oracle.com/javase/6/docs/api/java/util/HashMap.html#entrySet() 
   and the like)


On Monday, June 24, 2013 11:57:46 AM UTC-7, Michael Gardner wrote:
>
> On Jun 24, 2013, at 11:14 , Sean Corfield <seanco...@gmail.com<javascript:>> 
> wrote: 
>
> > On Mon, Jun 24, 2013 at 8:49 AM, John Gabriele 
> > <jmg...@gmail.com<javascript:>> 
> 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 not forced to somehow create Map$Entry 
> > instances for the key/value pairs. 
>
> Huh. I had assumed this would work with any 2-element collection, like 
> destructuring. Why not? Performance reasons?

-- 
-- 
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