3 ms·
Regarding: "- Comment strings appearing before argument lists in functions. I would like to see the entire protocol, name and args, before reading
by escherize 12y ago
Regarding:
"- Comment strings appearing before argument lists in
functions. I would like to see the entire protocol,
name and args, before reading the docstring which may
refer to the args."
I think writing one doc string for a multivariate function is better than having to write one for many. Check out clojure core's min function:
(defn ^number min
"Returns the least of the nums."
([x] x)
([x y] (cljs.core/min x y))
([x y & more]
(reduce min (cljs.core/min x y) more)))
So there are occasions for this related to efficiency. Where would you prefer the docstring?