This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
Hello, I'm looking at http://clojure.github.io/tools.cli/ and trying to understand why the assoc-fn
is called twice? (I'm following the example in the GitHub README)
i.e.
["-v" nil "Verbosity level"
:id :verbosity
:default 0
:assoc-fn (fn [opts k v] (do (prn opts k v) (update-in opts [k] inc)))]
...this seems to get called twice even if I only use -v
once? e.g. lein run -v
(if I do lein run -vv
then it prints a message 4 times)
I can't see any reason for the -v
flag to cause the assoc-fn
to get executed twice?