Skip to content

Instantly share code, notes, and snippets.

@jclaggett
Created January 24, 2011 16:31
Show Gist options
  • Save jclaggett/793478 to your computer and use it in GitHub Desktop.
Save jclaggett/793478 to your computer and use it in GitHub Desktop.
(defn conjoin [& preds]
(fn [& args]
(let2
% (apply juxt preds)
% (map % args)
% (flatten %)
% (every? identity %))))
(defn disjoin [& preds]
(fn [& args]
(let2
% (apply juxt preds)
% (map % args)
% (flatten %)
% (some identity %))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment