Clojure> (use 'clojure.data) nil Clojure> (doc diff) ------------------------- clojure.data/diff ([a b]) Recursively compares a and b, returning a tuple of [things-only-in-a things-only-in-b things-in-both]. Comparison rules:
* For equal a and b, return [nil nil a]. * Maps are subdiffed where keys match and values differ. * Sets are never subdiffed. * All sequential things are treated as associative collections by their indexes, with results returned as vectors. * Everything else (including strings!) is treated as an atom and compared for equality. nil Clojure> (diff ["a" "b" "c"] ["c" "d"]) [["a" "b" "c"] ["c" "d"] nil] Looks like the result doesn't match documentation: "Recursively compares a and b, returning a tuple of [things-only-in-a things-only-in-b things-in-both]." -- 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