Skip to content

Instantly share code, notes, and snippets.

@jColeChanged
Created December 16, 2010 04:36
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 jColeChanged/743037 to your computer and use it in GitHub Desktop.
Save jColeChanged/743037 to your computer and use it in GitHub Desktop.
I hope Clojure is blessed.
(defn find-fn
[inputs outputs]
(doseq [x (ns-publics (the-ns `clojure.core))]
(try
(if (= outputs
(binding [*out* java.io.StringWriter]
(apply
(if (-> (second x) meta :macro)
(macroexpand `(second x))
(second x))
inputs)))
(println (first x)))
(catch Exception _)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment