> What is the canonical way to know whether something satisfies (is satisfies
> the right terminology?) a protocol.

You're looking for extends? ...
(doc extends?)
-------------------------
clojure.core/extends?
([protocol atype])
  Returns true if atype extends protocol

(defprotocol PStr "String extra functions." (strcat [s1 s2]))
(defrecord Mys [mys] PStr (strcat [this s2] (str (get this :mys) s2)))

(def ss (Mys. "foo"))
 (.strcat ss "/bar")
-> "foo/bar"

(extends? PStr Mys)
-> true

-Rgds, Adrian.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to