(defn arglist-for-arity
"Takes a fn node and an argc and returns the matching arglist"
[fn argc]
(let [arglists (->> fn :arglists (sort-by count))
arglist (->> arglists (filter #(= argc (count %))) first)
last-arglist (last arglists)]
(or arglist
(when (and (some '#{&} last-arglist)
(>= argc (- (count last-arglist) 2)))
last-arglist))))