There is clojure.data/diff, but whether it would work for you would depend on whether Clojure's = would compare your Java objects for equality in the way that you wanted. You could try it out on some test case to see.
http://clojure.github.com/clojure/clojure.data-api.html#clojure.data/diff http://clojuredocs.org/clojure_core/clojure.data/diff Andy On Mar 11, 2013, at 12:35 PM, Ryan wrote: > Hey Jim, > > Thanks for your replies for starters. > > Indeed I do not care what will happen to the original lists, i only care to > find out which objects from list A do not exist in list B. Ignore the key > part. > I was aware of the functionality which is provided by java.util.List but I > was hoping for a more clojurish way instead of calling java methods. > > or is it pointless and I should just use removeAll()? > > Ryan > > On Monday, March 11, 2013 8:49:45 PM UTC+2, Jim foo.bar wrote: > On 11/03/13 18:35, Jim - FooBar(); wrote: > > Well, java.util.List specifies a retainAll(Collection c) method which > > is basically the intersection between the 2 collections (the > > Collection this is called on and the argument). You are actually > > looking for the 'difference' but if you have the intersection and the > > total it's pretty trivial to find the difference. > > actually there is a removeAll(Collection c) which will (destructively) > give you exactly what you want...I guess that would be the fastest way > if you don't care about what happens to list A... > > hope that helps, > > Jim -- -- 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.