Hi,

Here would be the function returning a lazy seq of the map entries :

(def #^{:docstring "Returns a lazy seq of java.util.Map.MapEntry for
the map given as an argument." } mapentries (partial map identity))

(mapentries {:a 1 :b 2}) => ([:a 1] [:b 2])  (lazy seq)

Regards,

-- 
Laurent

2009/6/30 Raoul Duke <rao...@gmail.com>:
>
> hi,
>
> is there an equivalent of java.util.Map.entrySet() or an iterator over
> that? i see things for getting the keys alone, or the vals alone. i
> guess off the cuff i find it odd that doseq on a map doesn't give me
> k-v pairs as the entries by default, but gives them interleaved.
>
> -Mr. Not Yet With The Programme.
>
> >
>

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