Skip to content

Instantly share code, notes, and snippets.

@jColeChanged
Created April 23, 2011 04:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jColeChanged/938272 to your computer and use it in GitHub Desktop.
Save jColeChanged/938272 to your computer and use it in GitHub Desktop.
A Nifty Clojure Function
(defn fn-and
"Takes a set of functions and returns a fn which returns whether
every item in the juxtaposition of those functions is true."
([& fns]
(let [juxted-fns (apply juxt fns)]
(fn [& args] (every? true? (apply juxted-fns args))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment