extenders

clojure.core

  • (extenders protocol)
Returns a collection of the types explicitly extending protocol

1 Example top

  • user=> (defprotocol P (id [this]))
    P
    user=> (extend-protocol P 
             String 
             (id [this] this)
             clojure.lang.Symbol 
             (id [this] (name this))
             clojure.lang.Keyword
             (id [this] (name this)))
    nil
    user=> (extenders P)
    (java.lang.String clojure.lang.Symbol clojure.lang.Keyword)
    
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core_deftype.clj:475 top

(defn extenders 
  "Returns a collection of the types explicitly extending protocol"
  {:added "1.2"}
  [protocol]
  (keys (:impls protocol)))
Vars in clojure.core/extenders:
Used in 0 other vars

Comments top

No comments for extenders. Log in to add a comment.