Hi Tianxiang,
In my experience a good way to decouple a non-trivial fn with metrics is to
make the fn provide hooks for various events when metrics may be gathered.
(defn nop [& args])
(defn foo->bar [foo {:keys [on-foo on-bar] :or {on-foo nop on-bar nop} :as
options}]
(on-foo)
(let [bar (
What are some good ways of handling metric gathering (or, more generally,
AOP) in Clojure?
Suppose we have an application in which there is a transformation function,
foo->bar. Every time a foo is input to foo->bar, we'd like to increment the
foo-counter. Every time a bar is produced, we'd like
To answer my own question, it is because IPrintWithWriter is already
defined for records. Only define this with deftype.
On Friday, November 11, 2016 at 3:16:46 PM UTC-5, William la Forge wrote:
>
> WARNING: Protocol IPrintWithWriter implemented multiple times at line 9
> src\simpleArk\rolonReco
WARNING: Protocol IPrintWithWriter implemented multiple times at line 9
src\simpleArk\rolonRecord.cljc
Any ideas?
(ns simpleArk.rolonRecord)
#?(:clj
(defrecord Rolon-record [rolon-uuid])
:cljs
(defrecord Rolon-record [rolon-uuid] ;;this is line 9
IPrintWithWriter