Skip to content

Instantly share code, notes, and snippets.

@hiredman
Last active August 29, 2015 14:26
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 hiredman/2aa99f1c24634e0fd9de to your computer and use it in GitHub Desktop.
Save hiredman/2aa99f1c24634e0fd9de to your computer and use it in GitHub Desktop.
(def E
#{#{:a :b}
#{:c :d}
#{:e :f}})
(defn equal [& args]
(boolean
(seq (for [e E
:when (every? #(contains? e %) args)]
e))))
;; user=> (equal :a :b)
;; true
;; user=> (equal :c :d)
;; true
;; user=> (equal :a :d)
;; false
;; user=> (equal)
;; true
;; user=>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment