Thank you very much Rob and Michal, both issues are clear now.
Michael, I agree that the documentation for clojure.set/project could
improve. At least now there is your email to be sent around to those
like me who don't get it from the very succinct default doc string.
Albert
--
http://albert.ri
On 19 June 2010 18:59, Albert Cardona wrote:
> 1. How come APersistentMap$KeySet doesn't implement IPersistentSet?
Beyond what Rob has already written above, keys works with
APersistentMap$KeySeq (note the "q" at the end), not
APersistentMap$KeySet. To get at the latter, use (.keySet {:a 1 :b
2})
I'll take a whack at it.
> 1. How come APersistentMap$KeySet doesn't implement IPersistentSet?
Because keys and vals are designed to return (lazy) sequences. More
important, these two functions return those two sequences in the same
order. The laziness avoids having to incur the overhead of cr
Hi all,
I have run into the following two issues over the last few days. I
would appreciate insight/help/advice:
1. How come APersistentMap$KeySet doesn't implement IPersistentSet?
(clojure.set/intersection (keys {2 "two" 4 "four"}) #{2 3})
java.lang.ClassCastException: clojure.lang.APersiste