On Fri, May 24, 2013 at 1:25 PM, atkaaz <atk...@gmail.com> wrote:

> It kinda makes sense except I wouldn't have expected that on the map it
> would return a vector (but then how else could it return both key and value
> right? )  so everyone expects the "input" to the pred would be a vector
> when passed in a map.
>

It's actually a clojure.lang.MapEntry, which is a java.util.Map$Entry
that's also a clojure.lang.IPersistentCollection that acts like a vector.
So if you conj onto it, you get a vector with three things, and likewise
other fns that work with colls will give you vector results, but you can
also call clojure.core/key and clojure.core/val on it (or hand it to Java
code that expects a map entry).

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