concept extend - type in category clojure

appears as: extend-type, extend-type, n extend-type
Clojure: The Essential Reference

This is an excerpt from Manning's book Clojure: The Essential Reference.

extend-type is a shorter form of extend that uses fully formed function body, very similarly to what is available at defrecord declaration time:

(extend-type MyFace
  IFace
  (m2 [this] (str "MyFace::m2"))) ; #1

(m2 my-face)
;; "MyFace::m2"

If the same protocol needs to be extended to many types, it can be repetitive to write an extend-type for each of the types the protocol should extend to. extend-protocol aggregates all types into a single call: