> > > > > Why? keySet is specified to return a java.util.Set, and that is what > > it does. set? tests for IPersistentSet. > > I assumed the persistent properties caried over, and that > IPersistentSet was a java.util.Set. I also assumed that IPersistentSet > extended IFn. > > Looks like I got the implementation confused with the interfaces and > was wrong on both accounts. >
I can see how that could be confusing at first. You might think an IPersistentSet is a subclass of java.util.Set and that set? asks if it is a java.util.Set. Then if you wanted to know if if something is an IPersistentSet, you might have to call "ipset?" But another name for that would be "clojure-base-set". But then if you think about it, "clojure-base-set" or even "clojure-set" would be redundant. Afterall, we're looking at clojure code. I wonder though if you can call instanceof from clojure to test Java types. --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---