1. How to combine protocols? For example I have protocols walks, talks, sleeps, now how might I come up with an abstraction which walks-talks-and-sleeps ? In Java one might create an interface which extends multiple interfaces. Although getting an instance which walks-talks-and-sleeps is made easy with deftype.
On a related note if I have a protocol P how can I create a protocol with is a union of P and java.lang.Comparable ? 2. Does it make sense to have "static" fns as part of Clojure protocols? For example a fn such as can-walk? could make sense as part of the walks protocol. I realize I can create a (defn can-walk? ...) in the protocol ns and its the same from caller's pov .. (proto-ns/can-walk? ...). But how about having can-I-walk? as part of the walks protocol itself (somehow to me it gives a more complete feeling). 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