Skip to content

Instantly share code, notes, and snippets.

@nchurch
Created October 20, 2011 19:56
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 nchurch/1302155 to your computer and use it in GitHub Desktop.
Save nchurch/1302155 to your computer and use it in GitHub Desktop.
(ns ffind.core)
(defn argtest [func inp outp]
(try
(if (= (apply (eval func) inp) outp) func false)
(catch Exception e false)))
(defn ffind-in [nmspc inp outp]
(binding [*out* (java.io.StringWriter.)]
(vec (filter #(argtest % inp outp) (keys (ns-publics nmspc))))))
@nchurch
Copy link
Author

nchurch commented Oct 20, 2011

-> (ffind-in 'clojure.core [1 2] 3)
[bit-or bit-xor + unchecked-add +' unchecked-add-int]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment