The second case is equivalent to (into [] [{:a 1 :b 2}]). You're
passing a singleton list containing a single element which happens to
be a map.

-Per

On Thu, Apr 8, 2010 at 7:35 AM, Base <basselh...@gmail.com> wrote:
> Hi All -
>
> I have a question about into.
>
> When you run the into against a map you get a vector of
>
> (into [] {:a 1 :b 2})
>
> => [[:a 1] [:b 2]]
>
> However when you use a for in front of this you get the full map.
>
> (into [] (for [_ (range 1)] {:a 1 :b 2}))
>
> => [{:a 1, :b 2}]
>
> Why is this?  I would have expected them both to yield the same
> results...
>
> Thanks
>
> Bassel
>
> --
> 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
>
> To unsubscribe, reply using "remove me" as the subject.
>

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

Reply via email to