Skip to content

Instantly share code, notes, and snippets.

@jColeChanged
Created December 16, 2010 05:19
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/743070 to your computer and use it in GitHub Desktop.
Save jColeChanged/743070 to your computer and use it in GitHub Desktop.
God let this be useful.
(defn find-fn
[in out]
(map first (filter
(fn [x]
(try
(= out
(binding [*out* java.io.StringWriter]
(apply
(if (-> (second x) meta :macro)
(macroexpand `(second x))
(second x))
in)))
(catch Exception _ false)))
(ns-publics (the-ns `clojure.core)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment