--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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
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+unsubscribe@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+u...@googlegroups.com.
Expanding on what Jim said, you don't usually need to convert the keys of a map into a set, because the map pretty much acts like a set of its keys if you use contains?
For example, (contains? {:a 1, :b 2} :a) tests whether :a is among the set of keys in the map.
I believe that clojure.set's union, intersection, and difference all work out of the box on maps (acting as if they are sets of keys), but you should do some testing and/or inspection of the source code to verify this, especially on maps with nil or false values.
On Mon, Jul 1, 2013 at 12:37 PM, Jim - FooBar(); <jimpi...@gmail.com> wrote:
On 01/07/13 20:02, Pablo Nussembaum wrote:It doesn't need to be, does it?...the map itself ensures that there are no duplicate keys anyway. I guess it's one of those 'less is more' cases...
This is pretty strange behavior to me, why is the case that keys
function don't return a set like java?
Jim
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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
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+u...@googlegroups.com.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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
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+u...@googlegroups.com.
What bugs me is that "sorted-set-by" needs "apply" to convert a coll into a sorted set; there's no short-and-pithy "into" for that case, and no coll-taking and varargs version pair like vec/vector either.
--
Er...that won't use my custom comparator. :)