Created
May 14, 2019 08:22
-
-
Save Hendekagon/0696b859a49b2a78a28142ee6065183b to your computer and use it in GitHub Desktop.
Make functions public
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 defns-- | |
"Makes all private fns | |
in the namespace with the | |
given name public" | |
[namespace-name] | |
(doseq [[_ v] | |
(filter | |
(fn [[_ x]] | |
(if (var? x) (-> x meta :ns ns-name #{namespace-name}) false)) | |
(ns-map namespace-name))] | |
(alter-meta! v merge {:private false}))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You've found some private functions in a namespace and you need to use them. This function fixes that namespace for you.