Usually I have the same structure of my functions:
(defn func-name
([] (some actions))
([ar] (some actions))
([ar aar] (some actions)))
And usually only one of this variant is public
. But as You can see from my entry - all my function is public
because of using defn
instead of defn-
. But defn-
hide all function, including all overloaded.
Is there any way to 'hide' only part of overloaded function?
For example, I want to hide an func-name with arity of one and two arguments.
Ofcorse I can hide overloaded function inside one defn
like this:
(defn awesome[]
(let [func (fn some-func ([] (some actions))
([ar] (some actions)))]
(func)))
But I think it's a little bit messy and I'm sure there have to be a way to solve it.
Thanks!