Skip to content

Instantly share code, notes, and snippets.

@hoeck
Created October 2, 2010 10:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hoeck/607516 to your computer and use it in GitHub Desktop.
Save hoeck/607516 to your computer and use it in GitHub Desktop.
(require '[clojure.set :as set])
(let [ss0 (sorted-set 1 2 3)
ss1 (sorted-set-by #(* -1 (.compareTo %1 %2)) 4 5 6)]
(= (seq (set/union ss0 ss1))
(seq (set/union ss1 ss0))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment