Created
January 11, 2013 23:03
-
-
Save jsl/4514711 to your computer and use it in GitHub Desktop.
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 all-functions | |
([root-n] (all-functions root-n [])) | |
([cur fns] | |
(if (= java.util.ArrayList (class cur)) | |
(if (empty? cur) | |
fns | |
(map #(all-functions % fns) cur)) | |
(if (= org.jruby.ast.DefnNode (class cur)) | |
(all-functions (.childNodes cur) (conj fns cur)) | |
(all-functions (.childNodes cur) fns))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment