Hi,
Am 07.08.2009 um 20:55 schrieb Andy Chambers:
Does clojure have an equivalent of either CLOS's `call-next-method' or
java's super?
You can use get-method.
(derive ::Foo ::Bar)
(derive ::Foo ::Frob)
(defmulti do-something
type)
(defmethod
Hey All,
Does clojure have an equivalent of either CLOS's `call-next-method' or
java's super?
For example, given the multi-method, and the interfaces ICDISCElement
and IODMDef, where IODMDef extends ICDISCElement
(defmulti validate class)
(defmethod validate ICDISCElement [elem]
There isn't an equivalent right now. The simplest workaround is to
factor out the common code into an ordinary function, and call it from
your multimethods.
-SS
On Aug 7, 2:55 pm, Andy Chambers achambers.h...@googlemail.com
wrote:
Hey All,
Does clojure have an equivalent of either CLOS's