Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Make functions public
(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})))
@Hendekagon

This comment has been minimized.

Copy link
Owner Author

Hendekagon commented May 14, 2019

You've found some private functions in a namespace and you need to use them. This function fixes that namespace for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.