In the following example:

(defprotocol testp (foo[this]))
(extend-protocol testp clojure.lang.PersistentVector (foo [this] 
"PersistentVector impl"))
(extend-protocol testp clojure.lang.Seqable (foo [this] "Seqable impl"))
(foo []) => "PersistentVector impl"
(foo '()) => "Seqable impl"

(extends? testp  clojure.lang.Seqable) => true
(extends? testp (type '())) => false
(satisfies? testp '()) => true


So it seems 'extends?' only returns true when the type has the protocol 
extended on it directly, not by any inheritance. Is there anyway to also 
check 'extend?' with inheritance considered? Thanks


-- 
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