2 ms·
Oh. Interesting. I had to look it up: When :extend-via-metadata is true, values can extend protocols by adding metadata where keys are fully-qualified protocol
by panick21_ 1y ago
Oh. Interesting. I had to look it up:
When :extend-via-metadata is true, values can extend protocols by adding metadata where keys are fully-qualified protocol function symbols and values are function implementations. Protocol implementations are checked first for direct definitions (defrecord, deftype, reify), then metadata definitions, then external extensions (extend, extend-type, extend-protocol).
(def component (with-meta {:name "db"} {`start (constantly "started")}))
(start component)
;;=> "started"
Kind of a crazy feature.