Created
December 16, 2010 04:36
-
-
Save jColeChanged/743037 to your computer and use it in GitHub Desktop.
I hope Clojure is blessed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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